public async Task UpdateCategory(Category category) { context.Entry(category).State = EntityState.Modified; await context.SaveChangesAsync(); }
public async Task InsertCategory(Category category) { category.Deleted = false; context.Categories.Add(category); await context.SaveChangesAsync(); }