/// <summary> /// 更新数据行 /// </summary> /// <param name="entity">实体</param> /// <returns>更新成功则返回true</returns> public bool Update(Tag entity) { return CONN.Update<Tag>(entity); }
public static MvcHtmlString TagLink(this HtmlHelper helper, Tag tag) { return helper.ActionLink(tag.TagName, "Tag", "Blog", new { tag = tag.TagUrlSlug }, new { title = String.Format("See all posts in {0}", tag.TagName) }); }
/// <summary> /// 从数据库中删除指定的实体,是以主键方式删除 /// </summary> /// <param name="entity">实体</param> /// <returns>删除成功则返回true</returns> public bool Delete(Tag entity) { return CONN.Delete<Tag>(entity); }
/// <summary> /// 在数据库中添加行,如果主键是自增的那么设置主键是没有意义的 /// </summary> /// <param name="entity">实体</param> /// <returns></returns> public bool Add(Tag entity) { return CONN.Insert<Tag>(entity); }
/// <summary> /// 更新数据行 /// </summary> /// <param name="entity">实体</param> /// <returns>更新成功则返回true</returns> public bool Update(Tag entity) { return TagDAL.Instance.Update(entity); }
/// <summary> /// 从数据库中删除指定的实体,是以主键方式删除 /// </summary> /// <param name="entity">实体</param> /// <returns>删除成功则返回true</returns> public bool Delete(Tag entity) { return TagDAL.Instance.Delete(entity); }
public bool Add(Tag entity) { return TagDAL.Instance.Add(entity); }