// GET: Departments
        public ActionResult Index()
        {
            var service = new BuildingService();
            var model   = service.GetBuildings();

            return(View(model));
        }
        public async Task <IHttpActionResult> GetAllBuildings()
        {
            {
                //instantiate building service
                BuildingService service = CreateBuildingService();

                //return the values as an ienumerable
                IEnumerable <BuildingListItem> buildings = await service.GetBuildings();

                return(Ok(buildings)); //200
            }
        }
 public List <Building> GetBuildings([FromQuery] QueryParameter parameter)
 {
     return(BuildingService.GetBuildings(parameter));
 }
Example #4
0
        public async Task <IActionResult> GetBuildings([FromQuery] BuildingUserParams buildingParams)
        {
            var buildings = await _buildingService.GetBuildings(buildingParams);

            return(Ok(buildings));
        }
Example #5
0
 // GET: Building
 public async Task <ActionResult> Index()
 {
     return(View(await buildingService.GetBuildings()));
 }