How to use SQLite in Windows (Phone) 8.1's BackgroundTask

℡╲_俬逩灬. 提交于 2019-12-01 12:24:01

Sometimes the answer is easier than expected.

Steps

  1. Set the Background Task's Library Target to only target Windows (Phone) 8.1
  2. Create a Class Library that targets only Windows (Phone) 8.1
  3. Add SQLite for Windows (Phone) 8.1 to the Class Library
  4. Reference the Class Library with the Background Task

That's it!

Do most of the work in the Class Library and only make calls from the Background task, this makes the BGT look cleaner. The nice thing about using a Class Library is that you can use generics.

You will have 2 Background Tasks for your universal app

  • Windows 8.1 Background Task
  • Windows Phone 8.1 Background Task
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!