public static LocationDto MapFromEntity(Location location) { var dto = new LocationDto(); dto.Id = location.Id; dto.Name = location.Name; dto.Latitude = location.Latitude; dto.Longitude = location.Longitude; dto.RegionId = location.RegionId; dto.Thumbnail = location.Thumbnail; return(dto); }
public static RegionDetailsDto MapFromEntity(Region region) { var dto = new RegionDetailsDto(); dto.Id = region.Id; dto.Name = region.Name; dto.Latitude = region.Latitude; dto.Longitude = region.Longitude; dto.StateId = region.StateId; dto.Locations = region.Locations.Select(location => LocationDto.MapFromEntity(location)).ToList(); return(dto); }