This commit is contained in:
nek0 2020-06-05 11:56:07 +02:00
commit 0fc3569322
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));