Entity Framework

Uses your system voice; voice and rate in settings.

Q851939Snapshot

≈ 3 min read

Names in other languages

  • EspañolADO.NET Entity Framework
  • NederlandsADO.NET Entity Framework
  • РусскийADO.NET Entity Framework
  • 简体中文ADO.NET Entity Framework
  • 繁體中文ADO.NET Entity Framework
  • 中文ADO.NET Entity Framework
  • EnglishEntity Framework
  • MagyarEntity Framework

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

Entity Framework (EF) is an open source object–relational mapping (ORM) framework for ADO.NET. It was originally shipped as an integral part of .NET Framework, however starting with Entity Framework version 6.0 it has been delivered separately from the .NET Framework. Entity Framework 6.4 was the latest release of the classic framework. Although Entity Framework 6 is still supported, it is no longer being developed and will only receive fixes for security issues. A new framework known as Entity Framework Core (EF Core) was introduced in 2016 with similar but not complete feature parity. Version numbering of this framework restarted from 1.0.

Evidence and sources

Entity Framework (EF) is an open source object–relational mapping (ORM) framework for ADO.NET. It was originally shipped as an integral part of .NET Framework, however starting with Entity Framework version 6.0 it has been delivered separately from the .NET Framework. Entity Framework 6.4 was the latest release of the classic framework. Although Entity Framework 6 is still supported, it is no longer being developed and will only receive fixes for security issues.

A new framework known as Entity Framework Core (EF Core) was introduced in 2016 with similar but not complete feature parity. Version numbering of this framework restarted from 1.0.

EntityType ::= ENTITYTYPE entityTypeName [BASE entityTypeName] [ABSTRACT true|false] KEY propertyName [, propertyName]* {(propertyName PropertyType [PropertyFacet]*) +} PropertyType ::= ( (PrimitiveType [PrimitiveTypeFacets]*) | (complexTypeName) | RowType PropertyFacet ::= ( [NULLABLE true | false] | [DEFAULT defaultVal] | [MULTIPLICITY [1|* ) PropertyTypeFacet ::= MAXLENGTH | PRECISION | SCALE | UNICODE | FIXEDLENGTH | COLLATION | DATETIMEKIND | PRESERVESECONDS PrimitiveType ::= BINARY | STRING | BOOLEAN | SINGLE | DOUBLE | DECIMAL | GUID | BYTE | SBYTE | INT16 | INT32 | INT64 | DATETIME | DATETIMEOFFSET | TIME ) Facets are used to describe metadata of a property, such as whether it is nullable or has a default value, as also the cardinality of the property, i.e., whether the property is single valued or multi valued.

How it works

A multiplicity of “1” denotes a single valued property; a “*” means it is a multi-valued property. As an example, an entity can be denoted in SDL as: A relationship type is defined as specifying the end points and their multiplicities. For example, a one-to-many relationship between Customer and Orders can be defined as EF Core exposes design-time commands for migrations and reverse engineering via the .NET CLI (dotnet ef) and Visual Studio Package Manager Console, which scaffold a DbContext and entity types from an existing database.

Beyond the official tooling, IDE integrations provide GUI workflows for common tasks: EF Core Power Tools in Visual Studio adds database-first reverse engineering and model visualization, while Entity Developer offers a visual designer for EF Core that supports database-first and model-first approaches with code generation and mapping configuration. Similar capabilities are available in other IDEs (e.g., Rider’s UI for EF Core commands), and advanced scenarios can leverage customizable scaffolding templates to control generated code.

Text derived from https://en.wikipedia.org/w/index.php?oldid=1359100601 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

35 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.