I want to persist objects into Isolated Storage, so 开发者_运维问答far I could think of these ways:
- Serialize them into an xml file when saving and then serialize them back when saving.
- 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.
精彩评论