作为下一代 ADO.NET 3.0 的开发框架,Entity Framework 让我们从复杂的关系数据模型中解脱出来,使用更加符合面向对象的实体数据模型(Entity Data Model)来完成业务设计和开发。Entity Framework 很像 NHibernate,同样采取 XML 进行映射。不过借助于强大的可视化设计工具和向导,我们可以非常方便地完成这些头疼的工作。 Entity Framework 对 Linq 的直接支持 —— LINQ to EntitiesEntity Framework Features:
Entity DesignerGenerate a model from a database (via wizard) and display it on the designer surfaceEdit conceptual model properties (namespace, alias, etc.)Control visual aspects of the design surface (layout) and persist changesAdd, Delete, and Edit Entities; Scalar properties; Associations; and InheritanceAutomatic set managementAutomatic Navigation property managementError reportingValidate model and mappings using Entity Framework Runtime
Entity MappingView the mapping for a C-Side Entity or AssociationRename or delete C-Side objects without worrying about mappingMap an EntityType to multiple tablesApply multiple conditions to a table mappingMap associationsAutomatic generation of conditions and referential constraints on associationsTPH: Map an Entity hierarchy to a single tableTPT: Map an Entity hierarchy to multiple tables
Entity Model BrowserUnderstand and visualize the model in a tree hierarchyVisually relate shapes on the designer surface with hierarchy in model
Visual Studio IntegrationSupport for C# and VB in multiple project types: ASP.NET Web site, ASP.NET Web Application Project, Console, WinForms, and LibraryProject system integration: item template for .edmx file, model generation wizard, EdmxDeploy.exe, and Entity Framework validation on buildSupport for multiple Visual Studio editions: Express, Standard, Pro, and VSTS.ADO.NET team blog
本文来自云栖社区合作伙伴“doNET跨平台”,了解相关信息可以关注“opendotnet”微信公众号
相关资源:ADO.NET sql、LINQ to sql、ADO.NET Entity Framework(EF)数据库连接性能比较