public async Task <IActionResult> GetStockHistory(int id, [FromQuery] PaginationDto pagination) { string errorMessage; try { var result = await _services.GetStockHistory(id, pagination); return(Ok(result)); } catch (Exception ex) { errorMessage = ex.Message; } return(Ok(ResponseResultWithPagination.Failure <List <ProductStockDTO> >(errorMessage))); }