Пример #1
0
 static CustomMapper()
 {
     CustomMapper.Initialize();
 }
Пример #2
0
 public static void Register <T>(ISelectable <T> converter)
 {
     CustomMapper.Initialize();
     register[typeof(T)] = converter;
 }
Пример #3
0
        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());
        }