review
This commit is contained in:
parent
a8b1761867
commit
de7bc0871d
2 changed files with 1 additions and 3 deletions
|
@ -11,7 +11,6 @@ namespace BuecherwurmAPI.Models
|
|||
}
|
||||
public class ItemPost
|
||||
{
|
||||
[Required]
|
||||
public int BookId { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
@ -98,8 +98,7 @@ namespace BuecherwurmAPI.Models
|
|||
command.Parameters.Add(new SqliteParameter("@bookId", itemPost.BookId));
|
||||
command.ExecuteNonQuery();
|
||||
command.CommandText = "select last_insert_rowid()";
|
||||
Int64 LastRowId64 = (Int64)command.ExecuteScalar();
|
||||
long LastRowId = (long)LastRowId64;
|
||||
var LastRowId64 = (long)command.ExecuteScalar();
|
||||
var item = new Item{
|
||||
ItemId = LastRowId64,
|
||||
BookId = itemPost.BookId
|
||||
|
|
Loading…
Reference in a new issue