LINQ到SQL(Windows Phone的本地数据库)更好? (OR)一个用于移动的sqlite-net版本更好?用于Windows Phone 8本地数据库创建 [英] linq to sql (Local database for Windows Phone) better ? (OR) A sqlite-net version for mobile better ?? for windows phone 8 local database creation

查看:84
本文介绍了LINQ到SQL(Windows Phone的本地数据库)更好? (OR)一个用于移动的sqlite-net版本更好?用于Windows Phone 8本地数据库创建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建Windows Phone 8应用程序,我想在我的应用程序中存储大量数据,

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

我已经使用Windows 8的sqlite版本完成了Windows 8平板电脑应用程序.

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

我的疑问是要在Windows Phone 8中创建本地数据库,这是最可靠的版本吗?

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

选项1:-在Windows Phone 8中使用SQLite:移动版的sqlite-net版本

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

选项2:-linq到sql(Windows Phone的本地数据库)

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

如果我使用选项1,我可以轻松重用我的所有数据,DALC,BIZ图层,甚至在我的手机版本中(我已经为Windows 8平板电脑应用程序构建了它).

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).

如果我使用选项2,则需要创建数据的.sdf文件类型,并根据linq to sql修改我的图层.

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)我想知道哪一个最可靠?

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

2)在Windows Phone 8中使用SQLite是否有任何缺点:移动版的sqlite-net版本?

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

提前谢谢.

推荐答案

您可以将sqlite与linq一起用于sql甚至是实体框架.在此处查看文章 http://www.codeproject .com/Articles/236918/Using-SQLite-embedded-database-with-entity-framewo

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.

关于可靠性的问题,开发过它的人说sqlite非常可靠.我找不到任何研究,但知道例如firefox在内部使用它,并且我从未听说过firefox的配置被破坏的情况,我只是同意以下说法.另一个众所周知的实现是在TeamSpeak中.

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.

由于您正在使用手机,因此电池续航确实是一个问题.您说您有很多数据,这导致很多查询.正因为如此,您可能需要转向sqlite.

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.

如果我是您,那么我将有一个DAL,可以抽象该层.使用依赖注入选择DAL.从sqlite开始,如果它在某个时候不足,您可以随时切换.但是,手机上的数据迁移可能会引起问题.

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.

这篇关于LINQ到SQL(Windows Phone的本地数据库)更好? (OR)一个用于移动的sqlite-net版本更好?用于Windows Phone 8本地数据库创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆