实体框架使用XML文件 [英] Entity Framework with XML Files

查看:328
本文介绍了实体框架使用XML文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人点我一个很好的教程使用的XML文件,而不是数据库说明实体框架? 我所看到的与SQL数据库的一些很好的教程,但我不能跃升到一个XML文件中。

Can someone point me to a good tutorial explaining the Entity Framework using an XML file instead of a database? I have seen some good tutorials with SQL databases, but I can't make the leap to an XML file.

谢谢!

推荐答案

实体框架本身是供应商为基础,并且是的设计的工作在关系数据库中。如果你真的想,你可以写你自己的供应商EF的读取/写入到一个XML文件,但它是一个的巨大的工作量。

Entity Framework itself is provider-based, and is designed to operate over a relational database. If you really wanted to, you could write your own provider for EF that reads from/writes to an xml file, but it would be a huge amount of work.

我想你确实应该寻找一个:

I expect you should really be looking at one of:

  • LINQ到XML
  • XML(反)序列化
  • 的XPath / XQuery的
  • XSLT

实体框架不具备的自然的适合在这种情况下。

Entity Framework doesn't have a natural fit in this scenario.

这篇关于实体框架使用XML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆