private void View_OnCategoriesEdit(object sender, CategoryAdminEventArgs e)
        {
            Category category = this.categoryService.GetById(e.Id);

            if (category == null)
            {
                this.View.ModelState.
                AddModelError("", String.Format("Item with id {0} was not found", e.Id));
                return;
            }

            this.View.TryUpdateModel(category);

            if (this.View.ModelState.IsValid)
            {
                this.categoryService.Update(category);
            }
        }
 private void View_OnCategoriesDelete(object sender, CategoryAdminEventArgs e)
 {
     this.categoryService.Delete(e.Id);
 }