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