Пример #1
0
        public IQueryable <TEntity> Query()
        {
            var sql = dapperSqlGenerator?.Query <TEntity>();

            return(!sql.IsNullOrEmpty()
                ? dbConnection.Query <TEntity>(sql).AsQueryable()
                : dbConnection.GetAll <TEntity>().AsQueryable());
        }
Пример #2
0
        public IQueryable <TEntity> GetQueryable <TEntity>() where TEntity : class
        {
            var sql = dapperSqlGenerator?.Query <TEntity>();

            if (!sql.IsNullOrEmpty())
            {
                return(dbConnection.Query <TEntity>(sql).AsQueryable());
            }
            else
            {
                return(dbConnection.GetAll <TEntity>().AsQueryable());
            }
        }