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