コード例 #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)
         );
 }