public static T MapToObject <T>(DbDataReader reader) where T : new()
        {
            var obj = new T();

            KandaDbDataMapper.MapToObject(reader, obj);

            return(obj);
        }
        public static ICollection <T> MapToCollection <T>(DbDataReader reader) where T : new()
        {
            var collection = new Collection <T>();

            while (reader.Read())
            {
                var item = KandaDbDataMapper.MapToObject <T>(reader);

                collection.Add(item);
            }

            return(collection);
        }
        public static IEnumerable <T> MapToEnumerable <T>(DataTable table) where T : new()
        {
            var reader = default(DbDataReader);

            try
            {
                reader = new DataTableReader(table);

                return(KandaDbDataMapper.MapToEnumerable <T>(reader));
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
            }
        }
 public static void MapToParameters(KandaDbDataReader reader, object obj)
 {
     KandaDbDataMapper.MapToParameters(reader.InnerCommand, obj);
 }
 public static IEnumerable <T> MapToEnumerable <T>(DbDataReader reader) where T : new()
 {
     return(KandaDbDataMapper.MapToCollection <T>(reader));
 }