Пример #1
0
 public async Task UpdateCategory(Category category)
 {
     context.Entry(category).State = EntityState.Modified;
     await context.SaveChangesAsync();
 }
Пример #2
0
 public async Task InsertCategory(Category category)
 {
     category.Deleted = false;
     context.Categories.Add(category);
     await context.SaveChangesAsync();
 }