public static DocCategoryInfo FromDocCategory(DocCategory category) { return new DocCategoryInfo { Id = category.Id, Name = category.Name, Description = category.Description }; }
public void UpdateCategory(DocCategory category) { this.Repository.UpdateCategory(category); }
public void AddCategory(DocCategory category) { this.Repository.AddCategory(category); }
public void DeleteCategory(DocCategory category) { this.Repository.DeleteCategory(category); }
public ActionResult Delete(int categoryId) { DocCategory cat = new DocCategory { Id = categoryId }; this.DocCatService.DeleteCategory(cat); return RedirectToAction("List"); }