public async Task <IActionResult> Index() { EntityDTO dto = new EntityDTO() { Id = Guid.Parse(HttpContext.Session.GetString("LocationId")) }; IEnumerable <ReadFloorDTO> floors = await _floorService.GetAllFloor(dto); return(View(floors)); }
public async Task <List <ReadFloorDTO> > GetAllFloors(EntityDTO input) { try { var floors = await _floorService.GetAllFloor(input); return(floors); } catch (Exception) { throw; } }
/// <summary> /// Retrieves the list of values /// </summary> /// <returns></returns> // GET: api/Status public HttpResponseMessage GetFloor() { try { var lst = _FloorService.GetAllFloor(); if (lst != null) { return(new HttpResponseMessage() { Content = new StringContent(JArray.FromObject(lst).ToString(), Encoding.UTF8, "application/json") }); } return(Request.CreateResponse(HttpStatusCode.OK, lst)); } catch (Exception ex) { throw ex; //return new HttpResponseMessage(HttpStatusCode.InternalServerError); } }