コード例 #1
0
 public IActionResult Create()
 {
     ViewBag.Category = _categoryRepository.GetAllCategories();
     ViewBag.Agencies = _agencyRepository.GetAllAgencies();
     ViewBag.Cities   = _cityRepository.GetAllCities();
     return(View());
 }
コード例 #2
0
 public IActionResult Create()
 {
     ViewBag.Agents    = _agentRepository.GetAllAgents();
     ViewBag.Agencies  = _agencyRepository.GetAllAgencies();
     ViewBag.Countries = _countryRepository.GetAllCountries();
     return(View());
 }
コード例 #3
0
 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());
 }
コード例 #4
0
 public List <Agency> GetAllAgenciesByCity(string city)
 {
     if (string.IsNullOrEmpty(city))
     {
         return(_repository.GetAllAgencies());
     }
     else
     {
         return(_repository.GetAllAgenciesByCity(city));
     }
 }
コード例 #5
0
        public ActionResult GetAllAgencies()
        {
            List <Agency> agencies = _agencyRepository.GetAllAgencies();

            return(Ok(agencies));
        }
コード例 #6
0
 public IActionResult Create()
 {
     ViewBag.Agencies = _AgencyRepository.GetAllAgencies();
     return(View());
 }
コード例 #7
0
        public IActionResult Index()
        {
            var Agencies = _AgencyRepository.GetAllAgencies();

            return(View(Agencies));
        }