/// <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)); }
/// <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 }; }
/// <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)); }