EntityFramework Core technical line (EF7 has been renamed as EF Core and released at the end of June 2016), entityframeworkef7

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

EntityFramework Core technical line (EF7 has been renamed as EF Core and released at the end of June 2016), entityframeworkef7

Official Document address: https://github.com/aspnet/EntityFramework/wiki/Roadmap

 

After the extension and rename, the new version of the Entity Framework will finally meet with you, although a little shy. Please be considerate! The topic is officially entered below:

Entity Framework Core (EF Core)

The following are EF Core plans and technical routes. Note that these plans may discover changes because many issues are hard to predict. Even so, we should try our best to keep the plan open and transparent to address everyone's expectations for EF Core and make appropriate arrangements.

Schedule)

When the initial version is released, we plan to work with ASP.. NET Core (ASP. for more information about the release time of NET Core, see the following. The last line is the release time of EF Core at the end of 2016)

EF Core and ASP. NET Core does not have a strict hook (because EF Core is stored in ASP.. NET), but it is ASP. NET Core is an indispensable part, so ASP. NET Core, we must provide a stable EF Core version, which is very important!

 

Features (Features)

Because EF Core is a new code library, some of the features of earlier versions are not necessarily provided in EF Core. Based on this, we listed the features that have been implemented and planned for the first version.

  We also listed the features that we considered very important, but the initial EF Core version was not implemented. That is to say, EF6.x is still the best choice for many applications if these features are not implemented in EF Core..

Core 1.0.0 FeaturesImplemented (implemented)

The features listed below have been implemented and are included in the official pre-release (preview version ). Note that the following features may still have bugs, and the provided API may also change in the official version, because we are still working hard for the first stable version.

  • Modelling (modeling)

    Basic modelling (Basic modeling)POCO object-based get/set attributes support basic types (such as int and string) of BCL (basic class library );

    Built-in conventions (built-in conventions)Construct an initial model based on the entity class;

    Fluent API (Stream API)You can override OnMedelCreating in the upper and lower layers, and further configure the model based on the conventions;

    Data annotations (Data annotation)Added to the object class. Attributes on the attribute header affects the EF model (for example, adding [Required] Makes EF know that an attribute is Required );

    TPH inheritance pattern (TPH inheritance mode)A hierarchy of classes can be stored in a table of data and identified by a column in the database record;

    Relationships)Objects dependent on navigation attributes and foreign key attributes;

    Shadow state properties)There is no corresponding CLR class, but it is a part of the attributes of the model;

    Alternate keysYou can direct the link to a replacement key (not a primary key, but a unique column must be ensured );

    Model validation)It can prevent invalid models and provide error information;

    Key value generation (Key value generation)Two modes are available: User generation and database generation;

    Relational: Table mapping (Relational: Table ing)Allow entities to be mapped to tables or columns;

    

  • Change Tracking)

    Snapshot change tracking)Based on the original object values obtained from the database;

    Notification change tracking (Notification tracking change)Allow your entity to notify the change tracker when the property value changes;

    Accessing tracked state)The status of the object to be accessed (DbContext.EntryAndDbContext.ChangeTracker);

    Attaching detached entities/graphsProvides a new API DbContext. AttachGraph to help you attach instances to the context to save newly created or changed entities;

 

  • SaveChanges (SAVE)

Basic save functionality (Basic save Function)Allows the persistence of an entity instance to the database;

Optimistic Concurrency (Optimistic Concurrency)After another user obtains data from the database, if you try to change the data and submit it, this will be blocked;

   Async SaveChanges (asynchronously saved)When the database processes requests, the current thread is released to process other requests;

    Transactions (Transaction)This means that SaveChanges is always an atomic operation (either all successful, or any modification to the data (rollback), and provides APIs to share transactions between two different context instances;

    Relational: Batching of statements (Relational Database: Batch Statement)By batch processing INSERT/UPDATE/DELETE in a database Request, the system provides better performance;

 

  • Query)

Basic LINQ support (supports LINQ)Provides the ability to obtain data using LINQ;

    Mixed client/server evaluationQueries can contain logic that cannot be evaluated in the database. They must be evaluated in the memory;

    NoTrackingWhen you do not need to monitor changes (for example, the acquired data is used for read-only scenarios), you can disable tracing to perform queries faster;

   Eager Loading (preload)MethodIncludeAndThenInclude indicates that the associated data is obtained together during query;

    Async Query (asynchronous Query)When the database processes requests, the current thread is released to process other requests;

    Raw SQL queries (SQL statement query)Provides the DbSet. FromSql method to query data using SQL command statements. These queries can also be implemented using LINQ;

 

  • Database schema management (Database architecture management)

    Database creation/deletion APIsWhen you do not want to use migrations, you can quickly create and delete databases for testing;

    Relational database migrationsWhen the model changes, allow the relational database to update the schema );

    Reverse engineer from databaseGenerate a model based on an existing database;

 

  • Database Providers

   EntityFramework. SqlServerConnect to Microsoft SQL Server 2008 and later versions;

    EntityFramework. SqliteConnect to SQLite3 data addition;

    EntityFramework. InMemoryUsed for testing. You do not need to connect to a real database during connection;

    PostgresSupports Npgsql development;

    SQL CompactSupports development using ErikEJ;

    

  • Platforms

    Full. NETIncluding Console, WPF, WinForms, ASP. NET4, etc;

    . NET Core(Including ASP. NET Core) is designed to support Windwos, OSX, and Full. NET Core and. NET Core running on Linux;

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

 

 

In Progress (under development)

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

  •  Bug fixing)Improve the overall code quality and system reliability;
  •   LINQ Provider Improvements (improved by LINQ Provider)Increase the number of successful queries by LINQ, and improve the efficiency of Translating data into SQL statements and executing data in the database;
  •  Performance improvemetns (Performance Improvement)Solve performance bottlenecks;
  •  Documentaton (document)Preparing relevant document libraries;
  •  Intelliisense documentation)Developing applications using Visula Studio provides you with context help for EF Core );

 

Backlog Features (Features to be developed)

This is not a detailed list, but lists some important features that are not yet implemented by the EF Core of the current version.

 

Critical O/RM Features (key O/RM Features)

After the implementation of these features is listed below, we will use EF Core as the recommended version in EF, especially in areas not available in EF6.x (such as UWP and. NET Core), but before implementation, the first choice for many applications is still EF6.x;

 

  • Query)

    Improved translationA large number of queries can be executed, so that more logic can be evaluated in data, rather than in memory;

    GroupBy translationPut the logic of the LINQ GroupBy operator grouping into the database for execution, rather than in the memory;

   Lazy loadingWhen you access the navigation attribute, data is automatically obtained from the database;

    Explicit LoadingAllows you to load a large data volume navigation attribute of an object in advance;

    Raw SQL querys for non-Model typesAllows you to use a native SQL command to fill in a non-model-type object (usually non-normalized view-model );

 

  • Database schema management (Database architecture management)

    Visual Studio Wizard for reverse engineerWhen you generate a model from a database (the model here refers to the code-first model), you can visually configure connections, select tables, and so on.

    Update model from databaseWhen the database architecture changes, you are allowed to update the model generated from the database;

 

  • Modelling (modeling)

    Complex/value type (Complex type/value type)) Indicates an attribute set of an object without a primary key;

 

  • Change Tracking)

    Missing EntityEntry APIs from EF6.x (EntityEntry APIs Missing in EF6.x)For exampleReload,GetModifiedProperties,GetDatabaseValuesAnd so on;

 

  • Relational specific (special relationship)

    Stroed procedure maping) Allows EF to use the stored procedure to change the database persistence (FromSql has provided good support );

    View mapping)Allow EF to map database views;

    Connection resiliency (elastic Connection)Automatic retry of failed commands in the database is useful when you connect to SQL Azure. In this case (connect to SQL Azure) failure is normal.

 

High priority features (High-priority feature)

In our features to be developed, the features listed below have a higher priority. Of course, this cannot be an exact list. Although they have not yet implemented it, it does not affect EF Core to become an exciting version.

 

  • Modeling)

More flexible property mapping (More flexible property ing) such as constructor parameters, Get/Set methods, and property bags;

Visualizing a model visualizes a relationship diagram based on the Code-first model;

Simple type conversions (Simple type conversion) for example: string => xml;

Spatial data types (Spatial data type), for example, in SQL Server'sgeographyAndgeometry;

Relational-to-relational relationships (Many-to-many relationship) Modeling without join entity. Now you can use a join entity for many-to-many relationship modeling;

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

    

  • CRUD

    Seed dataAllows a group of data to be easily inserted (upserted );

   Etag-style concurrency token support;

    Eager loading rulesWhen an object is allowed to be queried, the associated default dataset is always obtained;

    Filtered loadingAllows you to load a subset of object objects;

    Simple command interceptionProvides a simple method to read or write the base before or after a command is sent to the database;

 

  • Proviers

    

Azure Table Storage

Redis

Other non-relational databases (Other non-relational databases)

    

 

Related Article

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.