Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the scope of ADO.NET Entity Framework tracking

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the relevant knowledge of "what is the scope of ADO.NET Entity Framework tracking". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

The community is unhappy with ADO.NET Entity Framework and LINQ to SQL because it doesn't support change tracking. But only when you connect to the context object can you modify the object and save it back to the database. Just like a database connection should be very fast, once the context object goes out of scope, the data object essentially goes into a read-only state. It is not a good idea to reattach them to the new context and write their changes back and forth.

Microsoft refused to solve the problem. Instead of adding change tracking inside data objects, as most ORM libraries do, they focus more on POCO or "simple initial C # objects."

On the Entity Framework Design blog, three Microsoft developers outlined some popular database access methods. * one is ADO.NET Entity Framework, which can write back the collection of changes to the database. They listed four "problems" of using ADO.NET datasets, but none of them made much sense. They all focus on sending change sets through untrusted boundaries, and it doesn't make much sense. Dataset access and ORM libraries are used to purify data, which should be handled by the application itself.

Next is the DTO or data transfer object. This is just an ideal saying, "We first put all the data in some objects, and then you deal with it." This has nothing to do with recent discussions, but it does illustrate what they think. The topic then briefly mentions REST. Now, we know that the ADO.NET Entity Framework team has completely forgotten what they should build. As for what they call "goals."

With N-tier improvements to Entity Framework, we want to solve some of the same problem spaces, such as datasets, but avoid some of its major problems. In theory, we prefer to provide modules for construction, which are attracting developers to build solutions on a wide range of architectures. For example, we need to provide complete controls for DTO supporters while reducing the pain of solving simple solutions.

Now the problem is pretty clear: ADO.NET Entity Framework doesn't want to be another ORM, it wants to be everything everyone needs. ADO.NET Entity Framework, as we have seen again and again, this approach is not satisfactory. Take a look at the team's statement that, in addition to these two points, there are some more interesting general representations for making changes in images, but in general, they have the same drawback: providing them with a solution does not authorize a level of user control, which is necessary for the most complex solutions and the most mature patterns.

This is the end of the content of "what is the scope of ADO.NET Entity Framework tracking". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 258

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report