Пример #1
0
        public static List <object> GetAll(Type type)
        {
            var query = "SELECT * FROM " + type.Name;

            return(DBAccess.Connection.Query(DBAccess.GetMapping(type), query));
        }
Пример #2
0
 public static IEnumerable <string> GetColumnNames(Type type)
 {
     return(DBAccess.GetMapping(type).Columns.Select(c => c.Name));
 }
Пример #3
0
 public static object Get(Type type, int id)
 {
     return(DBAccess.Connection.Get(id, DBAccess.GetMapping(type)));
 }
Пример #4
0
 public static IEnumerable <string> GetColumnNames <T>() where T : class, IEntity, new()
 {
     return(DBAccess.GetMapping <T>().Columns.Select(c => c.Name));
 }