public static RouteResponse BuildFromModel(OdcinekWłasny route) { var response = new RouteResponse() { Id = route.Id, Points = route.Punkty, Start = PlaceResponse.BuildFromModel(route.Poczatek), End = PlaceResponse.BuildFromModel(route.Koniec), MountainGroup = route.GrupaGorska.Nazwa }; return(response); }
public static PlaceResponse BuildFromModel(Miejsce place) { var response = new PlaceResponse() { Id = place.Id, Name = place.Nazwa, Longitude = place.DlugoscGeograficzna, Latitude = place.SzerokoscGeograficzna, Altitude = place.WysokoscNpm }; return(response); }
public static RouteResponse CreateCustomRoute(PlaceResponse start, PlaceResponse end, string mountainGroup, double distance) { var response = new RouteResponse() { Id = -1, Points = 0, Start = start, End = end, MountainGroup = mountainGroup }; response.CalculatePoints(distance); return(response); }