BExIS.Dlm.Services.DataStructure.MethodologyManager.Update C# (CSharp) Метод

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

public Update ( Methodology entity ) : Methodology
entity BExIS.Dlm.Entities.DataStructure.Methodology
Результат BExIS.Dlm.Entities.DataStructure.Methodology
        public Methodology Update(Methodology entity)
        {
            Contract.Requires(entity != null, "provided entity can not be null");
            Contract.Requires(entity.Id >= 0, "provided entity must have a permant ID");

            Contract.Ensures(Contract.Result<Methodology>() != null && Contract.Result<Methodology>().Id >= 0, "No entity is persisted!");

            using (IUnitOfWork uow = entity.GetUnitOfWork())
            {
                IRepository<Methodology> repo = uow.GetRepository<Methodology>();
                repo.Put(entity); // Merge is required here!!!!
                uow.Commit();
            }
            return (entity);
        }