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); }
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); }
public List <ZonaFl.Persistence.Entities.Country> FindAll() { CountryRepository countryrepo = new CountryRepository(); return(countryrepo.FindAll().ToList()); }