public async Task <IActionResult> Get([FromQuery] SearchParam fipso) { SecurityModel securityModel = (SecurityModel)(HttpContext.Items["SecurityModel"]); ResponseModel <List <BookDetails> > response = new ResponseModel <List <BookDetails> >(); try { response = await _inventoryServices.GetAsync(fipso, securityModel); response.Token = securityModel.Token; if (!response.Status) { return(BadRequest(response)); } return(Ok(response)); } catch (Exception ex) { response.Status = false; response.ReturnMessage.Add(ex.Message); return(BadRequest(response)); } }