Exemple #1
0
 public void EditCategory(Category category)
 {
     _blogContext.Update(category);
     _blogContext.Commit();
 }
Exemple #2
0
 public int AddCategory(Category category)
 {
     _blogContext.Add(category);
     _blogContext.Commit();
     return category.Id;
 }
 public static string CategoryLink(this UrlHelper helper, Category category)
 {
     return helper.Action("Category", "Blog", new { urlSlug = category.UrlSlug });
 }