public IQueryable <TEntity> Query() { var sql = dapperSqlGenerator?.Query <TEntity>(); return(!sql.IsNullOrEmpty() ? dbConnection.Query <TEntity>(sql).AsQueryable() : dbConnection.GetAll <TEntity>().AsQueryable()); }
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()); } }