Esempio n. 1
0
        public IQueryable <T> GetCountries <T>(Expression <Func <T, bool> > predicate = null) where T : Country
        {
            var query = CountryRepository.FindAll().OfType <T>();

            if (predicate != null)
            {
                query = query.Where(predicate);
            }

            return(query);
        }
Esempio n. 2
0
        internal Zone International(string homeCountryIsoAlpha3)
        {
            var international = new Zone();

            international.Id   = -103;
            international.Name = "International";
            foreach (var c in _countryRepository.FindAll())
            {
                if (c.IsoAlpha3.Trim().ToLowerInvariant() != homeCountryIsoAlpha3.Trim().ToLowerInvariant())
                {
                    international.Areas.Add(new ZoneArea {
                        CountryIsoAlpha3 = c.IsoAlpha3, RegionAbbreviation = string.Empty
                    });
                }
            }

            return(international);
        }
Esempio n. 3
0
        public List <ZonaFl.Persistence.Entities.Country> FindAll()
        {
            CountryRepository countryrepo = new CountryRepository();

            return(countryrepo.FindAll().ToList());
        }