正试图在Windows运行时组件中使用sqlite。但是当我添加nuget sqlite-net包时,我得到了一些219错误。无法找到任何地方。任何类似的问题?windows运行时组件中的sqlite
我终于用一个商店应用类库使用SQLite,并呼吁从我的Windows运行时组件在它的方法。
在商店应用方法
public async Task<IEnumerable<TaskGroup> > GetTaskGroup()
{
return await conn.QueryAsync<TaskGroup>("select * from TaskGroup");
}
调用赢运行时组件方法
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
但我不能这样做,因为它会给我访问问题,因为它是私人的。
任何soln?
请看到我的编辑到post..I使用第二种方法,但是仍然出现了一些错误。 – 2013-03-27 07:53:08
@PrakashR - 错误似乎是关于你的一个类。看看这个链接,因为它告诉你如何定义WRC的类:http://msdn.microsoft.com/en-us/library/windows/apps/hh779077.aspx希望有一些东西可以解决你的问题。 – 2013-03-27 22:45:44
@PrakashR如错误消息中所述,您的类“SQLLite.Models.TaskGroup”存在问题。其公共接口不符合Windows运行时组件要求。也许你在这个班有公共领域?如需进一步协助,请张贴其所有公众成员名单。 – 2013-03-28 06:01:41