13得票1回答
如何在SQLite.net中存储对象列表?

假设我有这两个对象:class Customer { [PrimaryKey] public string id; [??????] public List<int> addresses; } 和class Address { [PrimaryKe...

13得票6回答
如何在sqlite.net PCL中使用InsertOrReplace?

我正在使用这里的SQLite.net的PCL版本(https://github.com/oysteinkrog/SQLite.Net-PCL)。 这是我的简单类。 public class LogEntry { [PrimaryKey, AutoIncrement]...

12得票2回答
如何在不使用SQLite原始语句/conn.execute()的情况下为Sqlite.net设置默认值

我知道这是个愚蠢的问题,但我无法在任何地方找到答案。如何为 sqlite.net 模型中的一列设置默认值?这是我的模型类:public class ItemTaxes { [PrimaryKey] public string Sku { get; set;} publi...

9得票2回答
如何使用SQLite.NET PCL运行一批SQL语句

过去,我一直避免使用ORM并手工编写参数化查询等。这非常耗时,而且在首次开发应用程序时真的很麻烦。最近,我决定再次看看ORM,特别是Sqlite.NET ORM。 我想使用SQLite ORM功能,但也希望能够运行一批本地SQL命令来预填充数据库。 我们正在使用SqliteNetExten...

8得票3回答
SQLite.NET - System.NotSupportedException: Cannot compile: Parameter

我正在一个Xamarin iOS项目中使用SQLite.NET Async(http://www.nuget.org/packages/SQLite.Net.Async-PCL/),但是在使用表谓词查询时遇到了问题。 每当我使用下面的Get方法(非常简单)时,我都会收到一个异常,指出表达式无...

7得票2回答
使用Linq如何返回TableOjb1和TableObj2的包装对象?

class TableObj1 { public string Id {get; set;} public string Name {get; set;} } class TableObj2 { public string Id {get; set;} pub...