static CustomMapper() { CustomMapper.Initialize(); }
public static void Register <T>(ISelectable <T> converter) { CustomMapper.Initialize(); register[typeof(T)] = converter; }
public async Task <IList <T> > SelectAsync <T>(string sql, IList <Parameter> parameters = null, int timeout = 15) where T : class, new() { IEnumerable <T> result = null; using (IOrm orm = this.orm) { result = await orm.SelectAsync <T>(new SqlCommand(sql, parameters, timeout), CustomMapper.Resolve <T>()); } if (result == null) { return(null); } return(result.ToList()); }