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