linq to sql (Local database for Windows Phone) better ? (OR) A sqlite-net version for mobile better ?? for windows phone 8 local database creation

感情迁移 提交于 2019-12-21 06:04:29

问题


Hi I am creating windows phone 8 app , i want to store huge amount data in my app ,

i have already completed my windows 8 tablet app using sqlite version for windows 8.

my doubt is regarding creating a local datbase in windows phone 8 which is the most reliable one to go with ?

option 1:- Working with SQLite in Windows Phone 8: a sqlite-net version for mobile

option 2:- linq to sql (Local database for Windows Phone)

if i use the option 1 i can easily re-use all my Data, DALC, BIZ layers as it is even in my phone versions (which i already built for windows 8 tablet app).

if i use option 2 i need to create .sdf files type of my data and revamp my layers as per linq to sql .

1) I wanted to know which one is most reliable ?

2) are there any drawbacks in Working with SQLite in Windows Phone 8: a sqlite-net version for mobile ?

thanks in advance.


回答1:


You can use sqlite with linq to sql and even entity framework. See an article here http://www.codeproject.com/Articles/236918/Using-SQLite-embedded-database-with-entity-framewo

I don't know your design, so you have to estimate your portability there.

What comes to reliability, people who have developed with it say sqlite is ultra-reliable. I couldn't find any studies but knowing for example that firefox uses it internally and I've never heard of a case in which firefox had it's configuration corrupted, I just may agree with the statement. Another well known implementation is in TeamSpeak.

Since you are working on a phone, battery life is really an issue. You say you have lots of data, that leads to a lot of queries. You might need to turn to sqlite just because of that.

If I were you, I would have a DAL which abstracts this layer. Use dependency injection to pick a DAL. Start with sqlite and IF it falls short at some point, you can always switch. However, data migration on the phone may rise an issue.



来源:https://stackoverflow.com/questions/14701710/linq-to-sql-local-database-for-windows-phone-better-or-a-sqlite-net-versio

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