/// <summary> /// 获取一个实体,实体数量大于1将抛出异常 /// </summary> /// <typeparam name="S">泛型类型</typeparam> /// <param name="where">条件</param> /// <param name="order">排序</param> /// <param name="isAsc">是否升序</param> /// <returns></returns> public T SingleOrDefault <S>(Expression <Func <T, bool> > where = null, Expression <Func <T, S> > order = null, bool isAsc = true) { return(_baseDal.SingleOrDefault(where, order, isAsc)); }