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

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