Пример #1
0
        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);
        }
Пример #2
0
 public IEnumerable <ILocation> All()
 {
     return(db.Set <Dto.Location>().Select(item => MapFromDto(item)));
 }