問題描述
我正在嘗試在 Windows 運行時組件中使用 sqlite.但是當我添加 nuget sqlite-net 包時,我收到了一些 219 錯誤.無法在任何地方弄清楚.有沒有類似的問題?
am trying to use sqlite in a windows runtime component. But I get some 219 errors when i add the nuget sqlite-net package. couldnt figure it out anywhere. Any similar issues ?
我最終使用商店應用類庫來使用 sqlite 并從我的 Windows 運行時組件調用其中的這些方法.
I finally used a store app class library to use sqlite and called those methods in it from my windows runtime component.
商店應用程序中的方法
public async Task<IEnumerable<TaskGroup> > GetTaskGroup()
{
return await conn.QueryAsync<TaskGroup>("select * from TaskGroup");
}
win 運行時組件中的調用方法
calling method in win runtime component
public IAsyncOperation<IEnumerable<TaskGroup>> GetAllTaskGroup()
{
return m_objDAL.GetTaskGroup().AsAsyncOperation();
}
我收到以下錯誤
Error 1 Method 'Tasker.BAL.TaskManager.GetAllTaskGroup()' has a parameter of type 'Windows.Foundation.IAsyncOperation<System.Collections.Generic.IEnumerable<SQLLite.Models.TaskGroup>>' in its signature. Although this generic type is not a valid Windows Runtime type, the type or its generic parameters implement interfaces that are valid Windows Runtime types. Consider changing the type 'SQLLite.Models.TaskGroup' in the method signature. It is not a valid Windows Runtime parameter type.
將商店應用程序方法設為私有可根據此博客解決該問題http://rarcher.azurewebsites.net/Post/PostContent/23
making the store app method as private resolves it as per this blog http://rarcher.azurewebsites.net/Post/PostContent/23
但我不能這樣做,因為它會給我帶來訪問問題,因為它是私密的.
but i cant ue this since it will give me access issues since it is private.
有什么解決辦法嗎?
推薦答案
我不明白這些錯誤是什么,但是您是否首先通過工具">擴展"安裝 SQLite for Windows Runtime?sqlite-net 是 LINQ 查詢庫
I don't understand what these errors are, but did you first install the SQLite for Windows Runtime through Tools > Extensions? sqlite-net is LINQ query library
這篇關于windows運行時組件中的sqlite的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!