Пример #1
0
 public Domain Update(Domain domain)
 {
     var domainDetails = _domainRepository.Get(domain.Id);
     domainDetails.Name = domain.Name;
     domainDetails.Description = domain.Description;
     domainDetails.SubCategoryId = domain.SubCategoryId;
     _domainRepository.CommitChanges();
     return domainDetails;
 }
Пример #2
0
        public Domain Insert(Domain domain)
        {
            var domainDetails = new Domain();
            domainDetails.Name = domain.Name;
            domainDetails.Description = domain.Description;
            domainDetails.SubCategoryId = domain.SubCategoryId;

            domainDetails = _domainRepository.InsertOnCommit(domainDetails);
            _domainRepository.CommitChanges();
            return domainDetails;
        }