public async Task <Meal> UpdateAsync(Meal item) { using var db = new EfMealsDataModel(_options); var entityEntry = db.Meals.Update(item); await db.SaveChangesAsync().ConfigureAwait(true); return(entityEntry.Entity); }
public async Task DeleteAsync(uint id) { using var db = new EfMealsDataModel(_options); var item = await db.Meals.FindAsync(id); db.Meals.Remove(item); await db.SaveChangesAsync().ConfigureAwait(true); }