【问题标题】:Is sqlite.Net.Extensions functionalities supported in Uwp platform?Uwp 平台是否支持 sqlite.Net.Extensions 功能?
【发布时间】:2019-06-10 06:18:51
【问题描述】:

无法通过 Sqlite 连接使用任何 SQLExtensions 功能。

在UWP应用中安装SQLExtensions 2.1.0 nuget包,创建如下db连接,

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

但是我无法使用“conn”访问任何 SQlExtension 功能,例如 GetWithChildren 或 UpdateWithChildren,有没有办法在 UWP 平台上使用外键功能?

【问题讨论】:

    标签: sqlite uwp sqlite-net-extensions


    【解决方案1】:

    是的。

    访问写操作:

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

    访问读操作:

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

    [在 UWP 平台上测试]

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-14
      • 1970-01-01
      • 1970-01-01
      • 2018-09-21
      • 2013-09-16
      • 2019-03-14
      相关资源
      最近更新 更多