/// <summary>
 /// Deletes the category.
 /// </summary>
 /// <param name="category">The category.</param>
 /// <returns></returns>
 public int DeleteCategory(EBlogCategory category)
 {
     return ExecuteNonQuery(
         "DELETE TBlogCategory WHERE CategoryID = @CategoryID;",
         CreateParameter("@CategoryID", category.CategoryID)
         );
 }
 /// <summary>
 /// Changes the specified cat.
 /// </summary>
 /// <param name="cat">The cat.</param>
 /// <returns></returns>
 protected BBlogCategory Change(EBlogCategory cat)
 {
     return new BBlogCategory()
     {
         CategoryID = cat.CategoryID,
         CategoryName = cat.CategoryName,
         ParentCategoryID = cat.ParentCategoryID,
         OrderNo = cat.OrderNo
     };
 }
 /// <summary>
 /// Updates the category.
 /// </summary>
 /// <param name="category">The category.</param>
 /// <returns></returns>
 public int UpdateCategory(EBlogCategory category)
 {
     return ExecuteNonQuery(
         @"UPDATE TBlogCategory
     SET
     ParentCategoryID = @ParentCategoryID,
     CategoryName = @CategoryName,
     OrderNo = @OrderNo
     WHERE
     CategoryID = @CategoryID;",
         CreateParameter("@ParentCategoryID", category.ParentCategoryID),
         CreateParameter("@CategoryName", category.CategoryName),
         CreateParameter("@OrderNo", category.OrderNo),
         CreateParameter("@CategoryID", category.CategoryID)
     );
 }
 /// <summary>
 /// Inserts the category.
 /// </summary>
 /// <param name="category">The category.</param>
 /// <returns></returns>
 public int InsertCategory(EBlogCategory category)
 {
     return ExecuteInsertQueryReturnID(
         "TBlogCategory",
         new Dictionary<string, object>() {
             {"ParentCategoryID",category.ParentCategoryID},
             {"CategoryName",category.CategoryName},
             {"OrderNo",category.OrderNo}
         });
 }