public void Contains() { var region = new Region { Id = 1, Translation = new Translation("Saudi Arabia", "Саудовская Аравия") }; Assert.IsTrue(region.Contains("Sa", Culture.En)); Assert.IsTrue(region.Contains("sa", Culture.En)); Assert.IsTrue(region.Contains("Sa ar", Culture.En)); Assert.IsTrue(region.Contains("са ар")); Assert.IsFalse(region.Contains("ddd")); }
public IEnumerable<Place> GetPlaces(int? regionId, int page, int regionsPerPage, out int? max, out Region region, Culture culture = Culture.En, string search = null, int? placeTypeId = null, Order order = Order.Default) { var n = GetPlaces(regionId, (page - 1) * regionsPerPage, regionsPerPage, search, culture, placeTypeId, true, order); max = tempMax; region = regionId.HasValue ? DataManager.Regions.GetRegion(regionId.Value) : null; return n; }