Exemple #1
0
 /// <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) });
 }
Exemple #3
0
 /// <summary>
 /// 从数据库中删除指定的实体,是以主键方式删除
 /// </summary>
 /// <param name="entity">实体</param>
 /// <returns>删除成功则返回true</returns>
 public bool Delete(Tag entity)
 {         
    return CONN.Delete<Tag>(entity);
 }
Exemple #4
0
 /// <summary>
 /// 在数据库中添加行,如果主键是自增的那么设置主键是没有意义的
 /// </summary>
 /// <param name="entity">实体</param>
 /// <returns></returns>
 public bool Add(Tag entity)
 {
     return CONN.Insert<Tag>(entity);            
 }
Exemple #5
0
 /// <summary>
 /// 更新数据行
 /// </summary>
 /// <param name="entity">实体</param>
 /// <returns>更新成功则返回true</returns>
 public bool Update(Tag entity)
 {
    return TagDAL.Instance.Update(entity);
 }
Exemple #6
0
 /// <summary>
 /// 从数据库中删除指定的实体,是以主键方式删除
 /// </summary>
 /// <param name="entity">实体</param>
 /// <returns>删除成功则返回true</returns>
 public bool Delete(Tag entity)
 {
    return TagDAL.Instance.Delete(entity);
 }
Exemple #7
0
 public bool Add(Tag entity)
 {
     return TagDAL.Instance.Add(entity);
 }