diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2022-12-20 13:00:16 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2022-12-20 13:00:16 +0300 |
commit | c91f231892a7c78b3f331a10e3c5d40cf8e048ea (patch) | |
tree | 1cd48dba7a4383a2762ca2ce46f29d43b89b039c /src/Services/RhDatabaseClient.cs | |
parent | a9ffc5510dfa295c449f0b10e6de7352b16c5ee2 (diff) |
Remove temporary DbProduct class
Diffstat (limited to 'src/Services/RhDatabaseClient.cs')
-rw-r--r-- | src/Services/RhDatabaseClient.cs | 12 |
1 files 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<IEnumerable<DbProduct>>(response); + var products = JsonConvert.DeserializeObject<IEnumerable<Product>>(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 |