예제 #1
0
 /// <summary>
 /// Deletes the blog.
 /// </summary>
 /// <param name="blog">The blog.</param>
 /// <returns></returns>
 public int DeleteBlog(EBlog blog)
 {
     return ExecuteNonQuery(
         @"DELETE TBlog WHERE BlogID = @BlogID;",
         CreateParameter("@BlogID", blog.BlogID)
     );
 }
예제 #2
0
 /// <summary>
 /// Changes the specified blog.
 /// </summary>
 /// <param name="blog">The blog.</param>
 /// <returns></returns>
 protected BBlog Change(EBlog blog)
 {
     return new BBlog()
     {
         BlogID = blog.BlogID,
         BlogName = blog.BlogName
     };
 }
예제 #3
0
 /// <summary>
 /// Inserts the blog.
 /// </summary>
 /// <param name="blog">The blog.</param>
 /// <returns></returns>
 public int InsertBlog(EBlog blog)
 {
     return ExecuteInsertQueryReturnID(
         "TBlog",
         new Dictionary<string, object>() {
             {"BlogName", blog.BlogName}
         });
 }
예제 #4
0
 /// <summary>
 /// Updates the blog.
 /// </summary>
 /// <param name="blog">The blog.</param>
 /// <returns></returns>
 public int UpdateBlog(EBlog blog)
 {
     return ExecuteNonQuery(
         @"UPDATE TBlog
     SET
     BlogName = @BlogName
     WHERE BlogID = @BlogID",
         CreateParameter("@BlogName", blog.BlogName),
         CreateParameter("@BlogID", blog.BlogID)
         );
 }