Esempio n. 1
0
 static CustomMapper()
 {
     CustomMapper.Initialize();
 }
Esempio n. 2
0
 public static void Register <T>(ISelectable <T> converter)
 {
     CustomMapper.Initialize();
     register[typeof(T)] = converter;
 }
Esempio n. 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());
        }