Remove temporary DbProduct class
This commit is contained in:
parent
a9ffc5510d
commit
c91f231892
@ -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}";
|
||||
}
|
||||
}
|
||||
|
||||
private class DbProduct
|
||||
{
|
||||
public string productSku { get; set; }
|
||||
public string name { get; set; }
|
||||
return $"{product.ProductSku} {product.Name}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user