Пример #1
0
 /// <summary>
 /// 获取第一个或者null的实体
 /// </summary>
 /// <typeparam name="S">泛型类型</typeparam>
 /// <param name="where">条件</param>
 /// <param name="order">排序</param>
 /// <param name="isAsc">是否升序</param>
 /// <returns></returns>
 public T FirstOrDefault <S>(Expression <Func <T, bool> > where = null, Expression <Func <T, S> > order = null, bool isAsc = true)
 {
     return(_baseDal.FirstOrDefault <T>(where));
 }
Пример #2
0
 /// <summary>
 /// 获取第一个或者null的实体
 /// </summary>
 /// <typeparam name="S">泛型类型</typeparam>
 /// <param name="where">条件</param>
 /// <param name="order">排序</param>
 /// <param name="isAsc">是否升序</param>
 /// <returns></returns>
 public T FirstOrDefault <S>(Expression <Func <T, bool> > where = null)
 {
     return(_baseDal.FirstOrDefault <T>(where));
 }