aboutsummaryrefslogtreecommitdiff
path: root/src/Services
diff options
context:
space:
mode:
Diffstat (limited to 'src/Services')
-rw-r--r--src/Services/RhDatabaseClient.cs12
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