代码生成新增加排序字段

This commit is contained in:
不做码农
2021-12-01 21:03:27 +08:00
parent 5a03ce182b
commit 31b2681028
14 changed files with 106 additions and 50 deletions

View File

@@ -43,7 +43,7 @@ namespace ZR.Service
{
return baseRepository.Add(t);
}
public IInsertable<T> Insertable(T t)
public IInsertable<T> Insertable(T t)
{
return baseRepository.Insertable(t);
}
@@ -179,7 +179,7 @@ namespace ZR.Service
public DbResult<bool> UseTran(Action action)
{
var result = baseRepository.UseTran(action) ;
var result = baseRepository.UseTran(action);
return result;
}
@@ -330,6 +330,10 @@ namespace ZR.Service
{
return baseRepository.GetPages(where, parm, order, orderEnum);
}
public PagedInfo<T> GetPages(Expression<Func<T, bool>> where, PagerInfo parm, Expression<Func<T, object>> order, string orderByType)
{
return baseRepository.GetPages(where, parm, order, orderByType == "desc" ? OrderByType.Desc : OrderByType.Asc);
}
/// <summary>
/// 查询所有数据(无分页,请慎用)
/// </summary>