windows运行时组件中的sqlite

sqlite in windows runtime component(windows运行时组件中的sqlite)
本文介绍了windows运行时组件中的sqlite的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

FastAPI + Tortoise ORM + FastAPI Users (Python) - Relationship - Many To Many(FastAPI+Tortoise ORM+FastAPI用户(Python)-关系-多对多)
Window functions not working in pd.read_sql; Its shows error(窗口函数在pd.read_sql中不起作用;它显示错误)
(Closed) Leaflet.js: How I can Do Editing Geometry On Specific Object I Select Only?((已关闭)Leaflet.js:如何仅在我选择的特定对象上编辑几何图形?)
in sqlite update trigger with multiple if/Case Conditions(在具有多个IF/CASE条件的SQLite UPDATE触发器中)
Android: Why is Room so slow?(Android:为什么Room这么慢?)
Remote Procedure call failed with sql server 2008 R2(使用 sql server 2008 R2 的远程过程调用失败)