public bool Update(Plan plan) { context.Plans.Update(plan); context.Entry <Plan>(plan).Property(a => a.Created).IsModified = false; return(context.SaveChanges() > 0); }
public bool Update(Recipe recipe) { recipe.Updated = DateTime.UtcNow; context.Recipes.Update(recipe); context.Entry <Recipe>(recipe).Property(a => a.Created).IsModified = false; return(context.SaveChanges() > 0); }