Exemple #1
0
 public static List <Route> GetRoutes()
 {
     using (var db = new Database.T2RContext())
     {
         return(db.Routes.Include(r => r.City1).Include(r => r.City2).ToList());
     }
 }
Exemple #2
0
 public static List <City> GetCities()
 {
     using (var db = new Database.T2RContext())
     {
         return(db.Cities.ToList());
     }
 }
Exemple #3
0
 public static List <Connection> GetConnections()
 {
     using (var db = new Database.T2RContext())
     {
         //return db.Connections.ToList();// null;
         return(db.Connections.Include(c => c.City1).Include(c => c.City2).ToList());
     }
 }