fix missing ids on manually added e-media

This commit is contained in:
nek0 2020-04-29 14:36:31 +02:00
parent 67d1124b00
commit 63955ba9ee

View file

@ -69,7 +69,10 @@ namespace Bücherwurm
{
var newBook = new Book(NextId, Title, Author, Country, ILink, Link, Language, Pages, Year);
Products.Add(newBook);
Products.Add(new EBook(newBook));
NextId += 1;
var newEBook = new EBook(newBook);
newEBook.OverwriteNullId(NextId);
Products.Add(newBook);
NextId += 1;
}
@ -81,7 +84,10 @@ namespace Bücherwurm
{
var newMagazine = new Magazine(NextId, Title, Run, Audience, Topic);
Products.Add(newMagazine);
Products.Add(new EPaper(newMagazine));
NextId += 1;
var newEPaper = new EPaper(newMagazine);
newEPaper.OverwriteNullId(NextId);
Products.Add(newEPaper);
NextId += 1;
}