Xamarin 将SQLite net升级到SQLite.net-创建SQLite连接
我曾经在我的共享项目中打开我的Xamarin 将SQLite net升级到SQLite.net-创建SQLite连接,xamarin,database-connection,sqlite-net,Xamarin,Database Connection,Sqlite Net,我曾经在我的共享项目中打开我的SQLiteConnection,如下所示: var conn = new SQLiteConnection("MyDb.db3"); 构造函数已更改为以下签名: public SQLiteConnection(ISQLitePlatform sqlitePlatform, string databasePath, bool storeDateTimeAsTicks = true, IBlobSerializer serializer = null, ID
SQLiteConnection
,如下所示:
var conn = new SQLiteConnection("MyDb.db3");
构造函数已更改为以下签名:
public SQLiteConnection(ISQLitePlatform sqlitePlatform, string databasePath, bool storeDateTimeAsTicks = true, IBlobSerializer serializer = null, IDictionary<string, TableMapping> tableMappings = null, IDictionary<Type, string> extraTypeMappings = null, IContractResolver resolver = null);
public SQLiteConnection(ISQLitePlatform sqlitePlatform, string databasePath, SQLiteOpenFlags openFlags, bool storeDateTimeAsTicks = true, IBlobSerializer serializer = null, IDictionary<string, TableMapping> tableMappings = null, IDictionary<Type, string> extraTypeMappings = null, IContractResolver resolver = null);
public SQLiteConnection(isqlitemplatform-sqlitePlatform,string-databasePath,bool-storeDateTimeAsTicks=true,ibloberializer-serializer=null,IDictionary-tableMappings=null,idicontract-resolver-resolver=null);
公共SQLiteConnection(ISQLitePlatform sqlitePlatform,字符串数据库路径,SQLiteOpenFlags openFlags,bool storeDateTimeAsTicks=true,IBloberializer序列化器=null,IDictionary tableMappings=null,IDictionary extraTypeMappings=null,IContractResolver=null);
我在我的共享库中找不到任何关于如何实现这一点的示例/文档。一旦找到,就很容易了。命名空间
SQLite.Net.Platform
包含isqliteform
接口的实现
我必须在特定于de平台的库中实现这一点,而不是在共享库中实现
new SQLiteConnection(new SQLite.Net.Platform.XamarinAndroid.SQLitePlatformAndroid(), Path.Combine(path, db));
这似乎已经过时了。没有SQLite.Net.Platform。@Christoferohlson找到了解决方案吗?