From c91f231892a7c78b3f331a10e3c5d40cf8e048ea Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Tue, 20 Dec 2022 13:00:16 +0300 Subject: [PATCH] Remove temporary DbProduct class --- src/Services/RhDatabaseClient.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Services/RhDatabaseClient.cs b/src/Services/RhDatabaseClient.cs index 73bce3d..1776731 100644 --- a/src/Services/RhDatabaseClient.cs +++ b/src/Services/RhDatabaseClient.cs @@ -1,8 +1,8 @@ using Newtonsoft.Json; using RhSolutions.AddIn; +using RhSolutions.Models; using System.Collections.Generic; using System.Linq; -using System.Net; using System.Net.Http; using System.Threading.Tasks; @@ -18,7 +18,7 @@ namespace RhSolutions.Services string response = await httpClient.GetStringAsync(request); - var products = JsonConvert.DeserializeObject>(response); + var products = JsonConvert.DeserializeObject>(response); var product = products.FirstOrDefault(); @@ -28,14 +28,8 @@ namespace RhSolutions.Services } else { - return $"{product.productSku} {product.name}"; + return $"{product.ProductSku} {product.Name}"; } } - - private class DbProduct - { - public string productSku { get; set; } - public string name { get; set; } - } } } \ No newline at end of file