BExIS.Dlm.Services.Data.DatasetManager.UpdateDataset C# (CSharp) Метод

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

In cases that the dataset's attributes are changed, data set is bound to a research plan or other attributes of the dataset entity are changed, this method persists the changes.
Do NOT use this method to change the status of the dataset
public UpdateDataset ( Dataset dataset ) : Dataset
dataset Dataset A dataset instance containing the changes
Результат Dataset
        public Dataset UpdateDataset(Dataset dataset)
        {
            Contract.Requires(dataset != null);
            Contract.Requires(dataset.Id >= 0);

            Contract.Ensures(Contract.Result<Dataset>() != null && Contract.Result<Dataset>().Id >= 0);

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