Esempio n. 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;
        }
Esempio n. 2
0
 public AdsService()
 {
     adsRepository = new AdsRepository();
     locationRepository = new LocationRepository();
 }
Esempio n. 3
0
 public AdsController(AdsService aService, LocationRepository locationRepo, MeniuService mService)
 {
     locationRepository = locationRepo;
     service = aService;
     meniuService = mService;
 }
Esempio n. 4
0
 public MeniuService()
 {
     locationRepository = new LocationRepository();
 }