Example #1
0
        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);
        }
Example #2
0
 public ContinentViewModel(int idContinent)
 {
     ContinentVM = new ContinentModels(idContinent).ListeContinent.FirstOrDefault();
 }
Example #3
0
 public ContinentViewModel()
 {
     ContinentVM = new ContinentModel();
 }