Windows ランタイム コンポーネントで sqlite を使用しようとしています。しかし、nuget sqlite-net パッケージを追加すると、219 エラーが発生します。どこにもそれを理解できませんでした。同様の問題はありますか?
最後に、ストア アプリ クラス ライブラリを使用して sqlite を使用し、それらのメソッドを Windows ランタイム コンポーネントから呼び出しました。
ストアアプリでの方法
public async Task<IEnumerable<TaskGroup> > GetTaskGroup()
{
return await conn.QueryAsync<TaskGroup>("select * from TaskGroup");
}
win ランタイム コンポーネントでメソッドを呼び出す
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に従って解決されます
しかし、プライベートであるため、アクセスの問題が発生するため、これを使用できません。
任意のソルン?