BExIS.Dlm.Services.DataStructure.AggregateFunctionManager.Create C# (CSharp) Метод

Create() публичный Метод

public Create ( string name, string description ) : AggregateFunction
name string
description string
Результат AggregateFunction
        public AggregateFunction Create(string name, string description)
        {
            Contract.Requires(!string.IsNullOrWhiteSpace(name));
            Contract.Ensures(Contract.Result<AggregateFunction>() != null && Contract.Result<AggregateFunction>().Id >= 0);

            AggregateFunction u = new AggregateFunction()
            {
                Name = name,
                Description = description,
            };

            using (IUnitOfWork uow = this.GetUnitOfWork())
            {
                IRepository<AggregateFunction> repo = uow.GetRepository<AggregateFunction>();
                repo.Put(u);
                uow.Commit();
            }
            return (u);
        }