Пример #1
0
 /// <summary>
 /// 获取指定类型的第一个实体或null
 /// </summary>
 /// <param name="where">条件</param>
 /// <param name="order">排序</param>
 /// <param name="isAsc">是否升序,默认升序</param>
 /// <param name="selector">要返回对象的表达式</param>
 /// <returns></returns>
 public S GetFirstOrDefaultEntity <S, K>(Expression <Func <T, bool> > where = null, Expression <Func <T, K> > order = null,
                                         bool isAsc = true, Expression <Func <T, S> > selector = null) where S : class
 {
     return(_baseDal.GetFirstOrDefaultEntity(where, order, isAsc, selector));
 }