实体框架和 LINQExtender 项目有何不同?

发布于 2024-08-08 09:02:04 字数 696 浏览 2 评论 0原文

我已通过以下方式在 WPF 和 ASP.NET MVC 项目中使用 LINQ-to-SQL

  • 创建数据库
  • 将表拖到设计器中
  • 使用通过 LINQ 生成的类

现在我有一个项目,其中数据源是Web 服务、数据库和 XML 文件的组合。根据我对 Entity Framework 的理解,我可以像在 LINQ-to 中一样创建类似的类-SQL,但它们也会包装我的其他源(Web 服务、XML 文件等)但是,我不知道这如何与方便的拖放可视化设计器一起使用,因为它不知道调用我的服务的哪些方法来保存数据等。

所以我还找到了 LINQExtender 使您能够创建可由 LINQ 使用的数据提供程序。从某种意义上说,这与实体框架所做的事情相同,但它似乎是创建实体框架可以使用的类的一种方法。

像 LINQExtender 和实体框架这样的工具是创建数据提供程序/ORM 层的竞争解决方案,还是您可以一起使用它们的工具?

I have used LINQ-to-SQL in WPF and ASP.NET MVC projects in the following way:

  • create database
  • drag tables into the designer
  • use generated classes with LINQ

Now I have a project where the data sources are a mix of web services, a database, and XML files. From what I understand of Entity Framework, I can create similar classes as I can in LINQ-to-SQL but they would wrap my other sources as well (web services, XML files, etc.) However, I don't see how this would work with the convenient drag-and-drop visual designer since it wouldn't know which methods to call on my services to save the data, etc.

So I also found LINQExtender which enables you to create data providers which can be consumed by LINQ. In a sense, this is the same thing that the Entity Framework does yet it seems that it would be a way to create classes which could be used by the Entity Framework.

Are tools like LINQExtender and Entity Framework competing solutions to create data providers / ORM layer, or are they tools you would use together?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吾家有女初长成 2024-08-15 09:02:04

实体框架是一个 ORM,专门设计用于将数据库实体映射到对象。它仅适用于数据库。另一方面,LINQExtender 并不特定于数据库,并且可用于为任何类型的数据源创建 Linq 提供程序。

The Entity Framework is an ORM, specifically designed to map database entities to objects. It is only for databases. On the other hand, LINQExtender is not specific to databases, and can be used to create Linq providers for any kind of data source.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文