Changed design language. Added editions, better support for authors. Base for file handling
This commit is contained in:
@@ -34,6 +34,7 @@ public static class BookFactory
|
||||
HardcoverId = hardcoverId,
|
||||
BookAuthors = [],
|
||||
SeriesEntries = [],
|
||||
Editions = [],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -53,6 +54,13 @@ public static class BookFactory
|
||||
return book;
|
||||
}
|
||||
|
||||
public static Book WithEditions(this Book book, params (string? Isbn, string? Publisher, string? CoverUrl)[] editions)
|
||||
{
|
||||
foreach (var (isbn, publisher, coverUrl) in editions)
|
||||
book.Editions.Add(new Edition { BookId = book.Id, Isbn = isbn, Publisher = publisher, CoverUrl = coverUrl });
|
||||
return book;
|
||||
}
|
||||
|
||||
public static Book WithSeries(this Book book, int seriesId = 1, string seriesName = "Test Series", double position = 1.0, string? arc = null)
|
||||
{
|
||||
var series = new Series { Id = seriesId, Name = seriesName };
|
||||
|
||||
Reference in New Issue
Block a user