internal void EditCategoryEntity(EditCategoryBM bind) { Category category = this.Context.Categories.Find(bind.CategoryId); if (category != null) { category.Name = bind.CategoryName; } this.Context.SaveChanges(); }
public void Edit (HttpResponse response, HttpSession session, EditCategoryBM bind) { User user = this.GetAuthenticatedUser(response, session); if (user == null) { return; } this.service.EditCategoryEntity(bind); this.Redirect(response, "/categories/all"); }