* Update CatalogContextModelSnapshot.cs * Update CatalogContextSeed.cs * Modify CSV data * Give PictureFileName assignment
This commit is contained in:
parent
07d36e3188
commit
7e59cd1ffc
@ -181,7 +181,7 @@
|
||||
string[] csvheaders;
|
||||
try
|
||||
{
|
||||
string[] requiredHeaders = { "catalogtypename", "catalogbrandname", "description", "name", "price", "pictureFileName" };
|
||||
string[] requiredHeaders = { "catalogtypename", "catalogbrandname", "description", "name", "price", "picturefilename" };
|
||||
string[] optionalheaders = { "availablestock", "restockthreshold", "maxstockthreshold", "onreorder" };
|
||||
csvheaders = GetHeaders(csvFileCatalogItems, requiredHeaders, optionalheaders );
|
||||
}
|
||||
@ -234,7 +234,7 @@
|
||||
Description = column[Array.IndexOf(headers, "description")].Trim('"').Trim(),
|
||||
Name = column[Array.IndexOf(headers, "name")].Trim('"').Trim(),
|
||||
Price = price,
|
||||
PictureUri = column[Array.IndexOf(headers, "pictureuri")].Trim('"').Trim(),
|
||||
PictureFileName = column[Array.IndexOf(headers, "picturefilename")].Trim('"').Trim(),
|
||||
};
|
||||
|
||||
int availableStockIndex = Array.IndexOf(headers, "availablestock");
|
||||
|
@ -14,9 +14,10 @@ namespace Catalog.API.Infrastructure.Migrations
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "1.1.1")
|
||||
.HasAnnotation("SqlServer:Sequence:.catalog_brand_hilo", "'catalog_brand_hilo', '', '1', '10', '', '', 'Int64', 'False'")
|
||||
.HasAnnotation("SqlServer:Sequence:.catalog_hilo", "'catalog_hilo', '', '1', '10', '', '', 'Int64', 'False'")
|
||||
.HasAnnotation("SqlServer:Sequence:.catalog_type_hilo", "'catalog_type_hilo', '', '1', '10', '', '', 'Int64', 'False'")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128)
|
||||
.HasAnnotation("Relational:Sequence:.catalog_brand_hilo", "'catalog_brand_hilo', '', '1', '10', '', '', 'Int64', 'False'")
|
||||
.HasAnnotation("Relational:Sequence:.catalog_hilo", "'catalog_hilo', '', '1', '10', '', '', 'Int64', 'False'")
|
||||
.HasAnnotation("Relational:Sequence:.catalog_type_hilo", "'catalog_type_hilo', '', '1', '10', '', '', 'Int64', 'False'")
|
||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Catalog.API.Model.CatalogBrand", b =>
|
||||
@ -58,7 +59,7 @@ namespace Catalog.API.Infrastructure.Migrations
|
||||
|
||||
b.Property<bool>("OnReorder");
|
||||
|
||||
b.Property<string>("PictureUri");
|
||||
b.Property<string>("PictureFileName");
|
||||
|
||||
b.Property<decimal>("Price");
|
||||
|
||||
|
@ -5,7 +5,7 @@ T-Shirt,Other,Prism White T-Shirt,Prism White T-Shirt,12,3.png,56,false
|
||||
T-Shirt,.NET,.NET Foundation T-shirt,.NET Foundation T-shirt,12,4.png,120,false
|
||||
Sheet,Other,Roslyn Red Sheet,Roslyn Red Sheet,8.5,5.png,55,false
|
||||
T-Shirt,.NET,.NET Blue Hoodie,.NET Blue Hoodie,12,6.png,17,false
|
||||
T-Shirt,Other,Roslyn Red T-Shirt,Roslyn Red T-Shirt",12,7.png,8,false
|
||||
T-Shirt,Other,Roslyn Red T-Shirt,Roslyn Red T-Shirt,12,7.png,8,false
|
||||
T-Shirt,Other,Kudu Purple Hoodie,Kudu Purple Hoodie,8.5,8.png,34,false
|
||||
Mug,Other,Cup<T> White Mug,Cup<T> White Mug,12,9.png,76,false
|
||||
Sheet,.NET,.NET Foundation Sheet,.NET Foundation Sheet,12,10.png,11,false
|
||||
|
Can't render this file because it contains an unexpected character in line 8 and column 52.
|
Loading…
x
Reference in New Issue
Block a user