public static ContinentModel CreateContinent(IContinent continent) { var result = new ContinentModel { Code = continent.Code, Name = continent.Name, }; if (continent.Counties.Count > 0) { for (var i = 0; i < continent.Counties.Count; i++) { result.Counties.Add(CreateCountry(continent.Counties[i])); } } return(result); }
public ContinentViewModel(int idContinent) { ContinentVM = new ContinentModels(idContinent).ListeContinent.FirstOrDefault(); }
public ContinentViewModel() { ContinentVM = new ContinentModel(); }