问题
I have installed sqlite-net from NuGet package in my windows phone universal app. But it does not contain foreign key relationship attribute between tables. I searched the web and found that SQLITE-Net Extenstions can handle this by using attributes, But it can only be installed on Windows 8.1 app not on windows Phone 8.1.
How can use this extension in windows phone 8.1 or is there any other solution for foreign key relationships in sqlite?
Thanks!
回答1:
There exists a PCL version of this library. If you install via NuGet, you might see this error
You can solve this by cloning the repository as follows:
and then adding it as an existing project to your solution.
(right click your solution in Solution Explorer
, Add
, Existing Project...
)
Then select the right folder:
After that you can add a reference to your WP8.1 project.
回答2:
I'm pretty sure that SQLite-Net Extensions library is WP8 compatible. If the NuGet package is not compatible, you can try download it and re-compile it yourself.
来源:https://stackoverflow.com/questions/24859799/windows-phone-8-1-sqlite-net-foreign-key-relationship