예제 #1
0
 public virtual Response Delete(Expression <Func <TModel, bool> > expression)
 {
     return(Respond(() =>
     {
         CurrentDb.Delete(expression);
     }));
 }
예제 #2
0
 /// <summary>
 /// 根据表达式删除
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public virtual bool Delete(Expression <Func <T, bool> > whereExpression)
 {
     return(CurrentDb.Delete(whereExpression));
 }
예제 #3
0
 /// <summary>
 /// 根据实体删除
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public virtual bool Delete(T data)
 {
     return(CurrentDb.Delete(data));
 }
예제 #4
0
 /// <summary>
 /// 根据主键删除
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public virtual bool Delete(dynamic id)
 {
     return(CurrentDb.Delete(id));
 }
예제 #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="whereExpression"></param>
 public void DeleteNews(Expression <Func <News, bool> > whereExpression)
 {
     CurrentDb.Delete(whereExpression);
 }