public IEnumerable <IJourneyLog> All() { var items = db.Set <Dto.JourneyLog>() .Include(j => j.Journey) .Include(j => j.Journey.StartLocation) .Include(j => j.Journey.EndLocation); var list = new List <IJourneyLog>(); foreach (var i in items) { var toAdd = MapFromDto(i); list.Add(toAdd); } return(list); }
public IEnumerable <ILocation> All() { return(db.Set <Dto.Location>().Select(item => MapFromDto(item))); }