public async Task <ActionResult <ProductImage> > GetProductImageOfProductId(int productId) { try { var result = await _productImageRepository.GetProductImageOfProductId(productId); if (result == null) { return(NotFound()); } return(result); } catch (Exception) { return(StatusCode(StatusCodes.Status500InternalServerError, "Error with getting data from database")); } }