fix missing ids on manually added e-media
This commit is contained in:
parent
67d1124b00
commit
63955ba9ee
1 changed files with 8 additions and 2 deletions
10
Catalogue.cs
10
Catalogue.cs
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue