Пример #1
0
 public AnalyzePriceList CreatePriceList(AnalyzePriceList priceList)
 {
     using (var database = new Core.Entity.SeedsEntities())
     {
         var entity = priceList.ToEntity(database);
         database.AddToAnalyzePriceList(entity);
         database.SaveChanges();
         var result = new AnalyzePriceList(database.AnalyzePriceList.Execute(MergeOption.NoTracking).Single(pl => pl.ID == entity.ID), true);
         Cache.Instance.PriceLists[result.ID] = result;
         return result;
     }
 }