public async Task <IHttpActionResult> GetBuildingsById([FromUri] int id) { { //instantiate service BuildingService service = CreateBuildingService(); //return the values as an ienumerable IEnumerable <BuildingListItem> building = await service.GetBuildingById(id); return(Ok(building)); //200 } }