make items from import

This commit is contained in:
nek0 2020-06-04 14:24:52 +02:00
parent ea81721be3
commit f94d8b2c65

View file

@ -43,10 +43,11 @@ namespace BuecherwurmAPI
imports.AddRange(importedBooks);
//imports.AddRange(importedMags);
var model = new Models.KatalogModel();
foreach (var item in imports)
{
model.AddProduct(item);
var id = catalogue.AddProduct(item);
items.NewItem(new Models.ItemPost{ BookId = (int)id});
items.NewItem(new Models.ItemPost{ BookId = (int)id});
}
}