small changes in KatalogModel

This commit is contained in:
Naumann 2020-06-04 15:31:47 +02:00
parent f94d8b2c65
commit 1ec245c6e2
2 changed files with 0 additions and 2 deletions

BIN
LongWormMemory.db Normal file

Binary file not shown.

View file

@ -130,8 +130,6 @@ namespace BuecherwurmAPI.Models
{ {
using (var command = _dbConnection.CreateCommand()) using (var command = _dbConnection.CreateCommand())
{ {
// funktioniert das so?
//muss ProduktId übergeben werden? -> ProductId wird weiter hinten mit 'NULL' befüllt, damit die ID automatisch vergeben wird.
command.CommandText = @"INSERT INTO Products (ProductId, Title, Author, Country, Link, Language, Pages, Year, Category, ImageLink, LendTime, LendType, Run, Audience, Topic) VALUES (NULL, @Title, @Author, @Country, @Link, @Language, @Pages, @Year, @Category, @ImageLink, @LendTime, @LendType, @Run, @Audience, @Topic)"; command.CommandText = @"INSERT INTO Products (ProductId, Title, Author, Country, Link, Language, Pages, Year, Category, ImageLink, LendTime, LendType, Run, Audience, Topic) VALUES (NULL, @Title, @Author, @Country, @Link, @Language, @Pages, @Year, @Category, @ImageLink, @LendTime, @LendType, @Run, @Audience, @Topic)";
command.Parameters.Add(new SqliteParameter("@Title", book.Title)); command.Parameters.Add(new SqliteParameter("@Title", book.Title));