EntityFramework Core Technology Line (EF7 has been renamed EF Core and released at the end of June 2016)

Source: Internet
Author: User
Tags connect to microsoft sql server

Official documents English Address: Https://github.com/aspnet/EntityFramework/wiki/Roadmap

After the extension and renaming, the new version of the Entity Framework finally to meet with you, although still a bit shy. Please forgive us! The following official entry topics:

Entity Framework core (EF Core)

  Here are the plans and technical lines for EF Core, and note that these plans are likely to find change because many things are difficult to predict. Even so, we keep our plans as open and transparent as possible, in order to understand the expectations of EF core and to make appropriate arrangements for them.

Schedule (timetable)

 When the initial release was released, our plan was to be consistent with ASP. (see here for the release time of ASP) (see here for more information) (Please refer to the section below, the last line is EF core release time 2016 end of 6)

EF Core doesn't have a tight hook with ASP. (Because EF core has many scenarios outside of ASP), but it's an integral part of ASP. So when we publish ASP, we have to provide a stable EF Core version, this is important!

Features (properties)

Because EF core is a new codebase (full rewrite), some of the features already in the previous version are not necessarily available in EF core. Based on this, we list the features that have been implemented and planned for the first version.

  We also list the features we consider important, but the initial version of EF Core is not implemented. That said, Ef6.x is still the best choice for many applications when these features are not implemented in EF core .

Core 1.0.0 featuresimplemented (implemented)

The features listed below have been implemented by EF Core and are already included in the official Pre-Release (preview version). Note that there may be bugs in the following features, and the API provided may change in the official version, as we are still working on the first stable version.

    • Modelling (modeling)

    Basic Modelling (base modeling) is based on the Get/set attribute of POCO entities and supports the underlying types (such as int, string, etc.) that come to the BCL (base Class library);

    built-in conventions (built-in convention) constructs an initial model based on the entity class;

    The Fluent API (Streaming API) allows you to override the method onmedelcreating up and down, further configuring the model based on the contract;

    data Annotations is added to the entity class, attributes on the property header, which affects the EF model (for example: adding [Required], which will let EF know that a property is required);

    TPH inheritance pattern (TPH inheritance mode) allows a class of an inheritance hierarchy to be saved to a table in the data, identifying the entity type through an authentication column in the database record;

    relationships (relationships) depend on the entities of the navigation property and foreign key attributes;

    Shadow State Properties (Shadow attribute) does not have a corresponding CLR class, but it is a part of the model property;

    Alternate keys (replace key ) can point a relationship to a substitution key (not the primary key, but to ensure that the unique column);

    model validation, which blocks invalid patterns in the model and provides error information;

    Key value generation (key Generation) contains two modes of user generated and database generation;

    relational:table Mapping (relational: Table Mapping) allows entities to be mapped to tables or columns;


    • Change Tracking (changes tracking)

    Snapshot Change tracking (tracking snapshot) based on the original value of the entity obtained from the database;

    Notification Change tracking (notification tracking changes) allows your entity to notify the change tracker when a property value is changed;

    Accessing tracked State (Access tracking State) accesses the status of the entity (via via DbContext.Entry and DbContext.ChangeTracker );

    attaching detached entities/graphs provides a new API Dbcontext.attachgraph help you attach instances to the context in order to save newly created or changed entities;

    • SaveChanges (Save)

Basic Save functionality (basic saving function) allows you to persist an instance of an entity into a database;

optimistic Concurrency (optimistic concurrency) when another user obtains data from the database, if you attempt to make changes to the data and commit it, it will be blocked;

   Async SaveChanges (Asynchronous Save) frees the current thread to handle other requests when the database processes the request;

    transactions means that SaveChanges is always an atomic operation (either all succeeds or any modification (rollback) of the data), while providing the API to allow two different context instances to share the transaction;

    relational:batching of statements (relational database: Bulk statement) provides better performance by batching Insert/update/delete in a single database request;

    • Query (Inquiry)

Basic LINQ Support (LINQ enabled) provides the ability to use LINQ to obtain data;

    Mixed client/server Evaluation queries can contain logic that cannot be evaluated in the database, and they must be evaluated in memory;

    NoTracking When you don't need to monitor changes (for example, the data gets used for a read-only scenario), you can turn off tracking to execute queries faster;

   Eager Loading (preloaded) provides methods Include andThenInclude来标识相关联的数据在查询时,一起被获取;

    Async Query (asynchronously) when the database processes a request, frees the current thread to handle another request;

    RAW SQL queries (SQL statement query) provides method Dbset.fromsql, which uses SQL command statements to query the data, and these queries can also be implemented using LINQ;

    • Database schema Management (data structure management)

    Database creation/deletion APIs quickly create and delete databases for testing when you don't want to use migrations;

    relational database Migrations allows relationships to update the schema when the model is changed;

    Reverse engineer from database generates a model based on the existence of databases;

    • Database Providers

   entityframework.sqlserver Connect to Microsoft SQL Server 2008 and above versions;

    entityframework.sqlite connection to SQLite3 data plus;

    entityframework.inmemory is used for testing, when connecting, without connecting to a real database;

    Postgres Support the use of npgsql development;

    SQL Compact supports the use of ERIKEJ development;


    • Platforms

    Full . NET includes Console, WPF,WINFORMS,ASP.NET4, etc.;

    . NET Core The goal of (including ASP. NET Core) is to support the WINDWOS,OSX, and the full.net and. NET core running on Linux;

   Universal Windows Platform (UWP) can use SQLite to provide services to access the local database;

In Progress (under development)

To release the 1.0.0, we are focusing on the following work:

    •  bug Fixing (bug fix) improves overall code quality and system reliability;
    •   LINQ Provider Improvements (LINQ Provider Improvements) increase the number of successful LINQ queries, increasing the efficiency of LINQ translation into SQL and execution in the database;
    •  Performance Improvemetns (performance improvement) to solve performance bottlenecks;
    •  Documentaton (document) is organizing the relevant document library;
    •  IntelliSense documentation (IntelliSense documentation) using Visula Studio to develop your app is providing you with context-sensitive Help for EF core (IntelliSense hints);

Backlog Features (pending development feature)

This is not an exhaustive list, but lists features that are important and are not yet implemented by the current version of EF core.

Critical o/rm Features (key o/rm features)

Following the implementation of these features, we will use EF Core as the recommended version in EF, especially where ef6.x is not available (for example, UWP and. NET Core), but before the implementation, many applications are still the preferred ef6.x;

    • Query (Inquiry)

    Improved translation can execute a large number of queries, allowing more logic to be evaluated in the data, rather than in memory;

    GroupBy translation The Logic of Grouping LINQ GroupBy operators into a database to execute, not in memory;

   Lazy loading automatically fetches data from the database when the navigation property is accessed;

    Explicit Loading allows you to load the navigation properties of a large amount of data in advance of an entity;

    Raw SQL Querys for Non-model types allows you to populate an object of non-model type (usually non-normalized view-model) with a native SQL command;

    • Database schema Management (data structure management)

    Visual Studio Wizard for reverse engineer when you generate a model from a database (the model here refers to the Code-first model), allows you to visually configure the connection, select the table, and so on.

    The update model from database allows you to update a model that was previously generated from a database when the schema changes.

    • Modelling (modeling)

    complex/value type (complex type/value type ) represents an attribute set of an entity with no primary key;

    • Change Tracking (changes tracking)

    Missing entityentry APIs from ef6.x (missing Entityentry APIs in ef6.x) such as, Reload GetModifiedProperties GetDatabaseValues et cetera;

    • Relational specific (special relationship)

    stroed procedure maping (Stored procedure mapping ) allows EF to use stored procedures to persist notconsistent to the database (the Fromsql method has provided good support);

    View mapping (views map) Allow EF to map database views;

    Connection resiliency (elastic connection) automatically retries a failed command in the database, which is useful when you are connected to SQL Azure, where failure to connect to SQL Azure is normal.

High-priority features (higher precedence feature)

Among our features to be developed, the features listed below have higher precedence, and of course this is not an exact list. Although they have not yet been implemented, this does not affect EF Core as an exciting version.

    • Modeling (modeling)

More flexible properties Mapping (more flexible attribute mappings) such as constructor parameters, Get/set methods, property bags, etc.;

Visualizing a model to visualize a graph based on code-first models;

Simple Type conversions (easy conversion) For example: string =>xml;

Spatial data types, for example, in SQL Server ' s geography andgeometry;

Many-to-many relationships (Many-to-many relationships) is modeled without a join entity. You have now been able to model many-to-many relationships using a join entity;

Alternate Inheritance mapping patterns (optional inheritance mapping mode) for relational databases, such as TPT,TPC;


    • Crud

    Seed data allows for easy insertion of a set of figures (upserted);

   Etag-style concurrency tokensupport;

    Eager Loading rules allow entities to be queried, the default datasets associated with them are always fetched;

    Filtered loading allows you to load a subset of the entity objects;

    Simple Command interception provides an easy way to read or write the base before or after the command is sent to the database;

    • Proviers


Azure Table Storage


Other non-relational databases (non-relational database)


EntityFramework Core Technology Line (EF7 has been renamed EF Core and released at the end of June 2016)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.