项目引用更新

This commit is contained in:
陈淳
2022-07-13 10:32:43 +08:00
parent 300d8224ec
commit 7fe9a6c900
17 changed files with 977 additions and 21 deletions

View File

@@ -189,7 +189,23 @@ namespace Yi.Framework.Repository
.ToStorage();
return await x.AsInsertable.ExecuteCommandAsync() > 0;//插入可插入部分
}
/// <summary>
/// 方法重载,多条件获取第一个值
/// </summary>
/// <returns></returns>
public async Task<T> GetFirstAsync(Expression<Func<T, bool>> where, Expression<Func<T, object>> order, OrderByType orderByType = OrderByType.Desc)
{
return await _Db.Queryable<T>().Where(where).OrderBy(order, orderByType).FirstAsync();
}
/// <summary>
/// 方法重载,多条件获取范围
/// </summary>
/// <returns></returns>
public async Task<List<T>> GetListAsync(Expression<Func<T, bool>> where, Expression<Func<T, object>> order, OrderByType orderByType = OrderByType.Desc)
{
return await _Db.Queryable<T>().Where(where).OrderBy(order, orderByType).ToListAsync();
}
}