コード例 #1
0
 /// <summary>
 /// Deletes the tag.
 /// </summary>
 /// <param name="tag">The tag.</param>
 /// <returns></returns>
 public int DeleteTag(EBlogTag tag)
 {
     return ExecuteNonQuery(
         @"Delete TBlogTag WHERE PostID = @PostID AND Tag = @Tag",
                CreateParameter("@PostID", tag.PostID),
                CreateParameter("@Tag", tag.Tag));
 }
コード例 #2
0
 /// <summary>
 /// Changes the specified tag.
 /// </summary>
 /// <param name="tag">The tag.</param>
 /// <returns></returns>
 protected BBlogTag Change(EBlogTag tag)
 {
     return new BBlogTag()
     {
         PostID = tag.PostID,
         Tag = tag.Tag
     };
 }
コード例 #3
0
 /// <summary>
 /// Inserts the tag.
 /// </summary>
 /// <param name="tag">The tag.</param>
 /// <returns></returns>
 public int InsertTag(EBlogTag tag)
 {
     return ExecuteNonQuery(
         @"INSERT INTO TBlogTag (PostID, Tag)
     VALUES (@PostID, @Tag)",
                CreateParameter("@PostID", tag.PostID),
                CreateParameter("@Tag", tag.Tag));
 }