public async Task <ActionResult> GetProductionLinesAsync([FromQuery] int offset = 0, [FromQuery] int limit = 50) { try { offset = (offset < 0) ? 0 : offset; limit = (limit > 50) ? 50 : limit; var productionLines = await _productionLineService.GetProductionLineAsync(offset, limit); return(Ok(productionLines)); } catch (Exception e) { return(StatusCode(StatusCodes.Status500InternalServerError, e.Message)); } }