开发者

Windows Phone 7 Data Persistence

开发者 https://www.devze.com 2023-01-24 20:55 出处:网络
I\'m would like some advice on the best data persistence solution to use for an 开发者_如何学运维application that will run on the desktop (WPF) and on Windows Phone 7, sharing data between both applic

I'm would like some advice on the best data persistence solution to use for an 开发者_如何学运维application that will run on the desktop (WPF) and on Windows Phone 7, sharing data between both applications. Ideally I would like to use the Entity Framework. I have considered the following technologies:

  1. Sync Framework 4.0 - only CTP at the moment but has the big advantage of offline use. However it is an immature framework that does not allow me to use Entity Framework and seems not to be very mainstream, requiring a fair bit of a learning curve to get working.
  2. WCF Data Service - has the advantage of allowing me to use Entity Framework. However there seems like a bit of a lag when retrieving data and off-line use is a problem.
  3. SQL CE with syncing to centrally hosted database using Sync Framework 2.1 - will work for my WPF application but not sure about the phone.

There are so many technologies available it is difficult to "see the forest for the trees". I'd like to stay fairly mainstream if possible just to make it easier with getting help and finding code samples etc. I'm open to any suggestions or guidance.


Unfortunately, SQL CE is not currenlty supported on the phone so you'll need to use one of the other available databases there.

Although it's only in a CTP format I'd recommend giving Sync Framework a look. It your synchronization requirements are anything but trivial you should really avoid reinventing the wheel by writing the synchronisation service yourself.

Even if you did use the Sync Framework, I don't understand why that would stop you using Entity Framework on the desktop.

AFAIK there are currently no ORMs for the WP7 so you'll have to create your own DAL there.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号