public IList <T> Select <T>(string sql, IList <Parameter> parameters = null, int timeout = 15) where T : class, new() { using (IOrm orm = this.orm) { return(orm.Select <T>(new SqlCommand(sql, parameters, timeout), CustomMapper.Resolve <T>()).ToList()); } }
public IList <T> Select <T>(Expression <Func <T, bool> > expression, int timeout = 15) where T : class, new() { using (IOrm orm = this.orm) { SqlCommand result = DynamicQuery.GetDynamicQuery(typeof(T).Name.ToLowerInvariant().Pluralize(), expression); return(orm.Select <T>(new SqlCommand(result.Statement, result.Parameters, timeout)).ToList()); } }