Beispiel #1
0
 public Plant EditPlant(Plant plant)
 {
     using (var database = new Core.Entity.SeedsEntities())
     {
         var entity = database.Plant.Single(p => p.ID == plant.ID);
         plant.ApplyChanges(database, entity);
         database.SaveChanges();
         var result = new Plant(entity, true, true);
         Cache.Instance.Plants[result.ID] = result;
         return result;
     }
 }