Ejemplo n.º 1
0
 public Bank CreateBank(Bank bank)
 {
     using (var database = new Core.Entity.SeedsEntities())
     {
         var entity = bank.ToEntity(database);
         database.AddToBank(entity);
         database.SaveChanges();
         var result = new Bank(database.Bank.Execute(MergeOption.NoTracking).Single(b => b.ID == entity.ID));
         Cache.Instance.Banks[result.ID] = result;
         return result;
     }
 }