Ejemplo n.º 1
0
 public static IJourney MapFromDto(Dto.Journey dto)
 {
     return(new Journey
     {
         Id = dto.Id,
         Distance = dto.Distance,
         StartLocation = (Location)LocationRepo.MapFromDto(dto.StartLocation),
         EndLocation = (Location)LocationRepo.MapFromDto(dto.EndLocation)
     });
 }
Ejemplo n.º 2
0
 private IJourneyLog MapFromDto(Dto.JourneyLog dto)
 {
     return(new JourneyLog
     {
         Id = dto.Id,
         JourneyId = dto.Journey.Id,
         Date = dto.Date.ToString("dd-MM-yyyy"),
         StartLocation = LocationRepo.MapFromDto(dto.Journey.StartLocation),
         EndLocation = LocationRepo.MapFromDto(dto.Journey.EndLocation),
         Distance = dto.Journey.Distance
     });
 }