sqlite.net

How to use InsertOrReplace in sqlite.net PCL?

你说的曾经没有我的故事 提交于 2019-11-30 23:18:06
问题 I am using the PCL version of sqlite.net from here (https://github.com/oysteinkrog/SQLite.Net-PCL). Here is my simple class. public class LogEntry { [PrimaryKey, AutoIncrement] public int Key { get; set;} public DateTime Date { get; set; } } When a new instance of LogEntry is created, the Key is automatically set to 0. I set the Date to something and then call InsertOrReplace. The record does get saved in my database. The Key field gets the autoincrement value which happens to be 0 since it

Is it possible to return dynamic objects or Dataset from a Sqlite Query?

∥☆過路亽.° 提交于 2019-11-28 00:34:12
I am using Sqlite.Net in my Xamarin.Forms application. So far it has been great at returning lists of objects if my object is a class like so: SqliteDatabase.Connection.Query<Customer>("Select * from Customers"); I would now like to return the equivalent of a DataSet dynamically from my query SqliteDatabase.Connection.Query("Select * from Customers inner join Calls on Customers.Id=Calls.CustomerId") Now from the second query I would like to return a DataSet instead of a list of objects. I know I could create a new object which combines the columns of Customers and Calls but I don't want to

Is it possible to return dynamic objects or Dataset from a Sqlite Query?

社会主义新天地 提交于 2019-11-26 21:44:43
问题 I am using Sqlite.Net in my Xamarin.Forms application. So far it has been great at returning lists of objects if my object is a class like so: SqliteDatabase.Connection.Query<Customer>("Select * from Customers"); I would now like to return the equivalent of a DataSet dynamically from my query SqliteDatabase.Connection.Query("Select * from Customers inner join Calls on Customers.Id=Calls.CustomerId") Now from the second query I would like to return a DataSet instead of a list of objects. I