In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Introduction to entity Framework (Entity Framework)
The relationship between EF and ADO.NET for short
ADO.NET Entity Framework is an object-relational Mapping solution developed by Microsoft based on ADO.NET, which was called ObjectSpace in the early days and has been published in Visual Studio 2008 Service Pack 1 and .NET Framework 3.5 Service Pack 1.
Entity framework Entity Framework is a group of technologies in ADO.NET that support the development of data-oriented software applications. Is a Microsoft ORM framework.
EF is very automated. Is its performance good?
EF performance is relatively high: EF is to help us generate SQL scripts, so at the SQLServer level, it's basically the same.
Performance loss: mainly in the stage of generating sql script, according to the change of entity, and then generate SQL according to the ORM mapping relationship in edmx, the performance loss is negligible at the whole system level.
When some of the SQL generated by EF is not very good, you can use your own SQL, or execute stored procedures.
What is Omax R Mapping?
In a broad sense, ORM refers to the transformation between the object-oriented object model and the data structure of a relational database.
In a narrow sense, ORM can be regarded as a virtual object-oriented data access interface based on the data storage of relational database. Ideally, based on such an object-oriented interface, you should not need to know any implementation details of storing data in a relational database to persist an OO object.
ORM: all the implementation of the ORM framework is to achieve a unified entry, developers through this unified entry to the table entity CRUD operation, and then the ORM framework automatically help us monitor the state of the entity changes, and then generate the corresponding SQL script according to the state of the entity, and then call the underlying ADO.NET to the database to affect the table changes.
ORM in EF
The entity data model (EDM) in EF is defined by the following three models and mapping files with corresponding file extensions:
Storage schema definition language file (.ssdl)-defines the storage model, the definition of objects, also known as logical model (O)
Conceptual schema definition language file (.csdl)-defines the conceptual model, table definition (R)
Mapping specification language file (.msl)-defines the mapping between the storage model and the conceptual model (M)
The entity framework uses these XML-based models and mapping files to transform the creation, reading, updating, and deletion of entities and relationships in the conceptual model into equivalent operations in the data source. EDM even supports mapping entities in the conceptual model to stored procedures in the data source.
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: 0
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.