public static DRiver FromRiverToDRiver(River river) { DRiver dataRiver = new DRiver { Length = river.Length, Name = river.Name, Countries = FromCountryToCountryRiver(river.Countries, river) }; return(dataRiver); }
//country moet geen rivieren hebben rivier moet minstens 1 country hebben public static List <CountryRiver> FromCountryToCountryRiver(IReadOnlyList <Country> countries, River river) { List <CountryRiver> countrieRivers = new List <CountryRiver>(); foreach (Country country in countries) { CountryRiver countrieRiver = new CountryRiver { Country = FromCountryToDCountry(country) }; DRiver dataRiver = new DRiver { Length = river.Length, Name = river.Name }; countrieRiver.River = dataRiver; countrieRivers.Add(countrieRiver); // Todo: key veranderen naar name??? van countryRiver1 nee want bij toevoeging rivier ? } return(countrieRivers); }
public static River FromDRiverToRiver(DRiver river) { //return new River(river.Name, river.Length, river.Countries[0].Country); throw new NotImplementedException(); }