public static void UpdateRoute(this RouteDTO model, ref Route route) { //route.Id = model.TourId; route.TourName = model.TourName; route.Date = model.Date; route.DistanceInMeters = model.DistanceInMeters; route.Path = new Path { LineColor = model.LineColor, Coordinates = model.Coordinates }; route.Info = model.Info; route.Waypoints = WaypointMapper.MapToWaypoints(model.Waypoints); }
public static Route MapToRoute(this RouteDTO model) => new Route { TourName = model.TourName, Date = model.Date, DistanceInMeters = model.DistanceInMeters, Path = new Path { LineColor = model.LineColor, Coordinates = model.Coordinates }, Info = model.Info, Waypoints = WaypointMapper.MapToWaypoints(model.Waypoints) };