public IActionResult Create()
 {
     ViewBag.Category = _categoryRepository.GetAllCategories();
     ViewBag.Agencies = _agencyRepository.GetAllAgencies();
     ViewBag.Cities   = _cityRepository.GetAllCities();
     return(View());
 }
 public IActionResult Create()
 {
     ViewBag.Agents    = _agentRepository.GetAllAgents();
     ViewBag.Agencies  = _agencyRepository.GetAllAgencies();
     ViewBag.Countries = _countryRepository.GetAllCountries();
     return(View());
 }
 public IActionResult Index()
 {
     ViewBag.AdminName     = _admin.Fullname;
     ViewBag.categoryCount = _categoryRepository.GetAllCategories().Count();
     ViewBag.agencyCount   = _agencyRepository.GetAllAgencies().Count();
     ViewBag.agentCount    = _agentRepository.GetAllAgents().Count();
     ViewBag.propertyCount = _propertyRepository.GetAllProperties().Count();
     return(View());
 }
Exemplo n.º 4
0
 public List <Agency> GetAllAgenciesByCity(string city)
 {
     if (string.IsNullOrEmpty(city))
     {
         return(_repository.GetAllAgencies());
     }
     else
     {
         return(_repository.GetAllAgenciesByCity(city));
     }
 }
Exemplo n.º 5
0
        public ActionResult GetAllAgencies()
        {
            List <Agency> agencies = _agencyRepository.GetAllAgencies();

            return(Ok(agencies));
        }
Exemplo n.º 6
0
 public IActionResult Create()
 {
     ViewBag.Agencies = _AgencyRepository.GetAllAgencies();
     return(View());
 }
        public IActionResult Index()
        {
            var Agencies = _AgencyRepository.GetAllAgencies();

            return(View(Agencies));
        }