From 79d81f531a1e3fc32b46c0a47ae8605c3c3abc7f Mon Sep 17 00:00:00 2001 From: veysel mutlu Date: Fri, 10 Sep 2021 21:18:02 +0300 Subject: [PATCH] Replaced ternary operator with switch --- .../Catalog.API/Extensions/CatalogItemExtensions.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs b/src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs index e953df581..3ca136f12 100644 --- a/src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs +++ b/src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs @@ -6,9 +6,12 @@ { if (item != null) { - item.PictureUri = azureStorageEnabled - ? picBaseUrl + item.PictureFileName - : picBaseUrl.Replace("[0]", item.Id.ToString()); + // https://www.linkedin.com/feed/update/urn:li:activity:6841055191211491328/ + item.PictureUri = azureStorageEnabled switch + { + true => picBaseUrl + item.PictureFileName, + _ => picBaseUrl.Replace("[0]", item.Id.ToString()) + }; } } }