From f94d8b2c658d321f0b11d4ae5d7b964e1c748f4b Mon Sep 17 00:00:00 2001 From: nek0 Date: Thu, 4 Jun 2020 14:24:52 +0200 Subject: [PATCH] make items from import --- Program.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Program.cs b/Program.cs index d9c5f01..b8f3c33 100644 --- a/Program.cs +++ b/Program.cs @@ -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}); } }