新增加删除重载方法

This commit is contained in:
不做码农 2022-02-10 22:01:59 +08:00
parent 2c9fc950f3
commit b6d759d1f8
4 changed files with 14 additions and 2 deletions

View File

@ -211,6 +211,10 @@ namespace ZR.Repository
}
#region delete
public IDeleteable<T> Deleteable()
{
return Context.Deleteable<T>();
}
/// <summary>
/// 删除表达式

View File

@ -69,7 +69,7 @@ namespace ZR.Repository
bool UseTran2(Action action);
#region delete
IDeleteable<T> Deleteable();
int Delete(Expression<Func<T, bool>> expression);
int Delete(object[] obj);
int Delete(object id);

View File

@ -211,6 +211,14 @@ namespace ZR.Service
#region delete
/// <summary>
/// 删除
/// </summary>
/// <returns></returns>
public IDeleteable<T> Deleteable()
{
return baseRepository.Deleteable();
}
/// <summary>
/// 删除表达式
/// </summary>

View File

@ -81,7 +81,7 @@ namespace ZR.Service
bool UseTran2(Action action);
#region delete
IDeleteable<T> Deleteable();
int Delete(Expression<Func<T, bool>> expression);
int Delete(object[] obj);
int Delete(object id);