public IActionResult Get([FromBody] OperationGetRequest query) => ReturnBadRequestIfThrowError(() => { var resources = _operationsService.GetOperations(query, UserId); Response.Headers.Add("X-Pagination", JsonConvert.SerializeObject(resources.PagingData())); return(resources); });
public IActionResult Get() { var result = _operationsService.GetOperations(); try { return(Ok(result)); } catch (Exception e) { return(BadRequest(e.ToString())); } }
public IEnumerable <Operation> Get() { return(operationsService.GetOperations()); }