简体   繁体   English

Uwp平台是否支持sqlite.Net.Extensions功能?

[英]Is sqlite.Net.Extensions functionalities supported in Uwp platform?

Not being able to use any SQLExtensions functionalities with Sqlite connection. 无法通过Sqlite连接使用任何SQLExtensions功能。

Installed SQLExtensions 2.1.0 nuget package in the UWP app, created the following db connection, 在UWP应用中安装了SQLExtensions 2.1.0 nuget软件包,创建了以下数据库连接,

using (SQLite.Net.SQLiteConnection conn = new SQLite.Net.SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), DB_PATH))
        {
            conn.CreateTable<DemoType1>();
            conn.Commit();
            conn.Close();
        }

however I am not able to access any SQlExtension functionalities using the "conn", such as GetWithChildren or UpdateWithChildren, is there any way to use the foreign key features on UWP platform? 但是我无法使用“ conn”访问任何SQlExtension功能,例如GetWithChildren或UpdateWithChildren,是否可以在UWP平台上使用外键功能?

Yes. 是。

Accessing Write Operation: 访问写操作:

SQLiteNetExtensions.Extensions.WriteOperations.UpdateWithChildren( SQLConnectionObject, EntityObject); 

Accessing Read Operation: 访问读取操作:

 var readData = SQLiteNetExtensions.Extensions.ReadOperations.GetWithChildren<Employee>(SQLConnectionObject, PrimaryKey);

[Tested on UWP Platform] [在UWP平台上测试]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM