From e7cd6decdb2ba1088efa18adcac8da6607d517a6 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Tue, 6 Jun 2023 09:49:17 +0300 Subject: [PATCH] Refactoring --- Controllers/ProductsController.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Controllers/ProductsController.cs b/Controllers/ProductsController.cs index 9c1cdd2..4045427 100644 --- a/Controllers/ProductsController.cs +++ b/Controllers/ProductsController.cs @@ -90,13 +90,9 @@ namespace MyDarling.Controllers } resizer.WriteResized(file, fullPath); - } - - if (!string.IsNullOrEmpty(fullPath)) - { resizer.CreateThumbnail(fullPath); } - + try { await context.SaveChangesAsync();