Ejemplo n.º 1
0
 public void Contains()
 {
     var country = new Country { Id = 1, Translation = new Translation("Saudi Arabia", "Саудовская Аравия") };
     Assert.IsTrue(country.Contains("Sa", Culture.En));
     Assert.IsTrue(country.Contains("sa", Culture.En));
     Assert.IsTrue(country.Contains("Sa ar", Culture.En));
     Assert.IsTrue(country.Contains("са ар"));
     Assert.IsFalse(country.Contains("ddd"));
 }
Ejemplo n.º 2
0
 public IEnumerable<Region> GetRegions(int? countryId, int page, int regionsPerPage, out int? max, out Country country, Culture culture = Culture.En, string search = null, Order order = Order.Default)
 {
     var n = GetRegions(countryId, (page - 1) * regionsPerPage, regionsPerPage, culture, search, order);
     max = tempMax;
     country = countryId.HasValue ? DataManager.Countries.GetCountry(countryId.Value) : null;
     return n;
 }