How to use Entity Framework 4.0 with Xml or in-memory Storage (non-SQL)

偶尔善良 提交于 2019-12-06 05:55:13
Shiraz Bhaiji

If you want to store data in Xml or memory you should probably not use EF. EF is designed to work with relational databases.

See also: Entity Framework with XML Files

For storing data in memory use System.Runtime.Caching

For storing data in xml files see: http://msdotnetsupport.blogspot.com/2007/04/reading-and-writing-xml-files-using-c.html

This is a good way to do what you're probably thinking.

Use a SQLite db as the backing store. That way you get you're single local file and you can still use almost all of EF.

http://dotnet.dzone.com/news/sqlite-entity-framework-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!