问题
I have a model on MVC project and suitable xml document , which gets from web service and it will be deserialized with type of my model. And I will get deserialized object and work with it. How to save locally changes in this model object?
回答1:
The design of your persistence layer depends alot on the purpose of your applciation, and the lifetime of the objects persisted. A NoSQL solution would provide a simple way to serialize/deserialize objects your application. MVC 4 pushes Entity Frameworkas its "Code-First" option for persisting objects into a SQL Server backed data store. Entity Framework has plenty of tutorials at the link I shared.
来源:https://stackoverflow.com/questions/21700102/how-to-locally-save-model-object-on-mvc-4