SQLite.Net-PCL
SQLite.Net-PCL copied to clipboard
Returning auto-incremented Id from Insert
The ReadMe document shows the Insert() command returning an object and being able to get the primary key from the auto-incremented field (see below) , but I only see a return type of int from the SQLiteConnection.Insert() function. Did something change and is now different than the documentation? If so what is the suggest method of getting the PK from the auto-incremented insert?
public static void AddStock(SQLiteConnection db, string symbol) { var s = db.Insert(new Stock() { Symbol = symbol }); Console.WriteLine("{0} == {1}", s.Symbol, s.Id); }
I have the same question