Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public IEnumerable<Route> GetAll(int locationId)
- {
- _db.Configuration.ProxyCreationEnabled = false;
- return _db.Routes.Include(o => o.ConnectionPointRoutes.Select(s => s.Segment))
- .Include(o => o.ConnectionPointRoutes.Select(c => c.ConnectionPoint)
- .Where( c => c.Location.LocationId == locationId)).ToList();
- }
- public IEnumerable<Route> GetAll(int locationId)
- {
- return _db.Routes
- .Include(o => o.ConnectionPointRoutes.Select(s => s.Segment))
- .Include(o => o.ConnectionPointRoutes.Select(c => c.ConnectionPoint))
- .Where(c => c.ConnectionPointRoutes.Select(s => s.ConnectionPoint.Location)
- .FirstOrDefault(q => q.LocationId == locationId).LocationId == locationId)
- .ToList();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement