Beispiel #1
0
        public void Test_Add()
        {
            var position    = _fixture.Create <int>();
            var russianName = _fixture.Create <string>();
            var englishName = _fixture.Create <string>();

            var id = _cities.Add(englishName, russianName, position);

            var russian = _cities.All(TwoLetterISOLanguageName.Russian).First(x => x.Id == id);

            var english = _cities.All(TwoLetterISOLanguageName.English).First(x => x.Id == id);

            russian.ShouldBeEquivalentTo(english, options => options.Excluding(x => x.Name));
            russian.Name.ShouldBeEquivalentTo(russianName);
            english.Name.ShouldBeEquivalentTo(englishName);
        }
Beispiel #2
0
 public List <DAL.Entity.City> GetAllCity()
 {
     try
     {
         return(_ICityRepository.All().Where(w => w.DeletedFlag == false).ToList());
     }
     catch (Exception exception)
     {
         exception.Log();
         return(null);
     }
 }
 public List <City> All()
 {
     return(CityRepository.All());
 }