开发者

Whats the best way of persisting data to Isolated Storage on Windows Phone 7?

开发者 https://www.devze.com 2023-01-09 19:28 出处:网络
I want to persist objects into Isolated Storage, so 开发者_运维问答far I could think of these ways:

I want to persist objects into Isolated Storage, so 开发者_运维问答far I could think of these ways:

  1. Serialize them into an xml file when saving and then serialize them back when saving.
  2. Use an Object DB. Doubt abounds about a good or recommended one (Examples are Perst, winphone7db and Sterling DB)

Anyone can suggest some best practices?


As a basic guideline:

If you need the functionality of a database (relations, transactions, search, etc.) then you should use a database.

If you just need an object store, then you should just save your objects into Isolated Storage directly (serialising where necessary).

I haven't used each of the different DB options available but would probably go with Perst as it's the most established (there's also a good guide here), winphone7db is also not available yet.

0

精彩评论

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