зеркало из https://github.com/Azure/reddog-code.git
AG: Support for product categories in orders data
This commit is contained in:
Родитель
2286635cbc
Коммит
4c6304fe49
|
@ -9,7 +9,7 @@ namespace RedDog.OrderService.Models
|
|||
{
|
||||
public class Product
|
||||
{
|
||||
private static string _productDefinitionFilename = Environment.GetEnvironmentVariable("PRODUCT_DEFINITION_FILENAME") ?? "DrugStoreProducts.json";
|
||||
private static string _productDefinitionFilename = Environment.GetEnvironmentVariable("PRODUCT_DEFINITION_FILENAME") ?? "DrugStoreProducts-categorized.json";
|
||||
private static List<Product> _products;
|
||||
|
||||
[JsonPropertyName("productId")]
|
||||
|
@ -30,6 +30,9 @@ namespace RedDog.OrderService.Models
|
|||
[JsonPropertyName("imageUrl")]
|
||||
public string ImageUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("categoryId")]
|
||||
public string CategoryId { get; set; }
|
||||
|
||||
public static async Task<List<Product>> GetAllAsync()
|
||||
{
|
||||
if(_products == null)
|
||||
|
|
Загрузка…
Ссылка в новой задаче