Пример #1
0
        public Meniu.Models.City GetCityFromCookie()
        {
            var cookie = GetCookie(Configuration.LocationCookieName);
            int cityId;

            if (cookie == null || !int.TryParse(cookie.Value, out cityId)) return new Models.City();

            locationRepository = new LocationRepository();

            var city = locationRepository.GetCity(cityId);
            return city;
        }
Пример #2
0
 public AdsService()
 {
     adsRepository = new AdsRepository();
     locationRepository = new LocationRepository();
 }
Пример #3
0
 public AdsController(AdsService aService, LocationRepository locationRepo, MeniuService mService)
 {
     locationRepository = locationRepo;
     service = aService;
     meniuService = mService;
 }
Пример #4
0
 public MeniuService()
 {
     locationRepository = new LocationRepository();
 }