Ejemplo n.º 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());
     }
 }
Ejemplo n.º 2
0
 public static List <City> GetCities()
 {
     using (var db = new Database.T2RContext())
     {
         return(db.Cities.ToList());
     }
 }
Ejemplo n.º 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());
     }
 }