首先编码,存储介质是XML [英] Code first with the storage medium being XML

查看:68
本文介绍了首先编码,存储介质是XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能吗?

我希望能够存储数据,以便在需要时可以通过文本文件编辑数据。是否可以将CodeFirst与XML一起使用,您将如何解决这个问题?还有另一种方法可以实现同样的目的吗?

I want to be able to store the data so that if needed the data can be edited via a text file. Is it possible to use CodeFirst with XML and how would you go about it? Is there another alternative to achieve the same thing?

推荐答案

Hello kaos83,

Hello kaos83,

 

欢迎来到EF论坛!

据我所知,Entity Framework是一个针对数据库的ORM工具,我不认为可以使用codefirst和XML,至少当前发布的版本不能这样做。

As i know, Entity Framework is an ORM tool which is against the database, I don't think it can use codefirst with XML, at least the current released version can't do this.

要以XML格式存储数据,可以使用LINQ to XML,这是更简单的方法。阅读本文:

http://msdn.microsoft.com/en -us / library / bb308960.aspx#xlinqoverview_topic2
,我希望它可以帮到你!

To store data in XML, you can use LINQ to XML, which is easier way to do this. Read this: http://msdn.microsoft.com/en-us/library/bb308960.aspx#xlinqoverview_topic2, i hope it can help you!

再次感谢你的帖子!

 

周末愉快!


这篇关于首先编码,存储介质是XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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