How to access a SqlServerCE database from a Background Agent in Mango?

372 views Asked by At

I'm trying to use background agents to update live tiles every x minutes. I've seen that I can use a Background Agent to update a live tile. I would like to make a query on the SqlCE db used in my project and I would like to execute it in the OnInvoke event.

How can I access a function present in my main WP7 project from the Background Agent project (in the same solution)?

1

There are 1 answers

4
Heinrich Ulbricht On BEST ANSWER

You can create a shared Class Library Project to share code between your UI and the Background Agent. Add a new Class Library to your solution and put all shared code in there. Then reference it from your main project and the Agent project.