public List <IdentifiedObject> GetList(DMSType type) { List <IdentifiedObject> l = new List <IdentifiedObject>(); try { using (DBContext context = new DBContext()) { foreach (object entity in tables[(int)type].GetList(context)) { l.Add(IdentifiedObject.Load(type, entity)); } } } catch (Exception e) { return(null); } return(l); }