Monday, 10 November 2014

Entity Framework (EF) Documentation

This page provides an index of videos, tutorials, and advanced documentation to help you make the most of Entity Framework. The following sections are included on this page.

Get Started with Entity Framework

Which workflow should I use videoWhich workflow should I use?Entity Framework allows you to create a model by writing code or using boxes and lines in the EF Designer. Both of these approaches can be used to target an existing database or create a new database. This short video explains the differences and how to find the one that is right for you.

I just want to write code...

I am creating a new database videoI am creating a new databaseUse Code First to define your model in code and then generate a database.
I need to access an existing database videoI need to access an existing databaseUse Code First to create a code based model that maps to an existing database.

I want to use a designer...

I am creating a new database videoI am creating a new databaseUse Model First to define your model using boxes and lines and then generate a database.
I need to access an existing database videoI need to access an existing databaseUse Database First to create a boxes and lines model that maps to an existing database.

Past & Future Versions

This page provides information on the latest version of Entity Framework (EF5), although much of it also applies to past versions. Check out the Version History for a complete list of versions and the features they introduced. The Past Versions page contains a snapshot of the documentation relating to each previous version of Entity Framework. The Future Versions page contains documentation we are creating for the next version of Entity Framework.

API Documentation

This page provides a series of articles, walkthroughs and other detailed content to help you achieve specific tasks. For detailed API documentation for the types included in Entity Framework, see the Entity Framework API Documentation.

Entity Framework 6.x

See the Get Entity Framework page for information on how to install EF6. See the Version History page for a list of new features in these releases.
These pages will help you move existing applications to EF6.
Upgrading to EF6A checklist of the things you need to do to upgrade an existing application to EF6.
Database Provider with EF6 SupportFind out which database providers currently support EF6.

Learn More About Setting Up Your Model

Which Workflow Should I UseFind out about the EF Designer and Code First and which one is best for you.
Connections and ModelsLearn how EF works out which database to connect to and how to calculate the model.
Connection Resiliency / Retry Logic (EF6 onwards)Automatically retry any commands that fail due to connection breaks .
Handling of Transaction Commit FailuresAutomatically recover from network errors when committing a transaction.
Performance ConsiderationsFind out how to get the best performance out of Entity Framework.
Improving Startup Performance with NGen (EF6 Onwards)Improve application warm up time by pre-generating native images for the EF assemblies.
Pre-Generated Mapping ViewsImprove application warm-up time with pre-generated mapping views.
Working with Microsoft SQL AzureThere are a number of characteristics of SQL Azure that need to be taken into account when using EF.
Entity Framework Power ToolsThe EF Power Tools provide a preview of features that are being considered for the main EF tooling.
Code-Based Configuration (EF6 onwards)Code-based configuration is achieved by creating a subclass of DbConfiguration .
Configuration File SettingsEF allows a number of settings to be configured from your applications configuration file.
Dependency Resolution (EF6 Onwards)Lower level building blocks that enable the Code-Based Configuration feature.
GlossaryDefinition of terms that are commonly used when talking about Entity Framework.
Creating a Model with Code First
These topics are specific to models created using EF Code First.
Code First to a New DatabaseUse Code First to define your model in code and then generate a database.
Code First to an Existing DatabaseUse Code First to create a code based model that maps to an existing database.
Customizing Code First to an Existing DatabaseCustomize the code that gets scaffolded by the Code First to Existing Database wizard.
ConventionsFind out about the conventions Code First uses to build your model.
Custom Code First Conventions (EF6 onwards)Write your own conventions to help avoid repetitive configuration. For more advanced scenarios you can useModel-Based Conventions.
Data AnnotationsData Annotations provide a simple way to configure your model by applying attributes to your classes.
Fluent API - Configuring/Mapping Properties & TypesLearn how to configure properties/types and the columns/tables they map to using the Fluent API.
Fluent API - Configuring RelationshipsFind out how to configure relationships and the foreign key constraints they map to using the Fluent API.
Fluent API with VB.NETThis walkthrough shows how to use the fluent API in VB.NET projects.
Code First Insert/Update/Delete Stored Procedures (EF6 onwards)Configure EF to use stored procedures to update data.
Enum Support (EF5 Onwards)The domain classes that make up your Code First model can contain enum properties.
Spatial Data Types (EF5 Onwards)The DbGeography and DbGeometry types can be used in your model. Also see the information aboutprovider support for spatial types.
Code First MigrationsLearn more about upgrading, downgrading and creating SQL scripts with Code First Migrations.
Code First Migrations in Team EnvironmentsLearn how to successfully use migrations when working in a team of developers.
Code First Migrations with an Existing DatabaseUse Migrations with an existing database, one that wasn't created by Entity Framework.
Automatic Code First MigrationsAutomatic migrations allow you to upgrade your database without code-based migrations in your project.
Customizing the Migrations History Table (Code First only)Customize the definition of the __MigrationHistory table.
Custom Migrations Operations (EF6 onwards)Create additional operations to be used in your code-based migrations .
Migrate.exeUse migrate.exe to apply migrations to a database from a command line.
Defining DbSetsDiscover the various options for defining DbSets on your derived context.
Creating a Model with the EF Designer
These topics are specific to models created using the EF Designer.
EF Designer to a New Database (Model First)Use Model First to define your model using boxes and lines and then generate a database.
EF Designer to an Existing Database (Database First)Use Database First to create a boxes and lines model that maps to an existing database.
Complex TypesFind out how to group properties on your entities into complex types.
Associations/RelationshipsLearn how to configure relationships in your model.
Enum Support (EF5 Onwards)Using the EF Designer you can now add enum properties to your entities.
Spatial Data Types (EF5 Onwards)The DbGeography and DbGeometry types can be used in your model. Also see the information aboutprovider support for spatial types.
TPT Inheritance PatternLearn how to implement the Table-per-Type (TPT) inheritance pattern in your model.
TPH Inheritance PatternLearn how to implement the Table-per-Hierarchy (TPH) inheritance pattern in your model.
Query with Stored ProceduresUse stored procedures to load data from the database.
Stored Procedures with Multiple Result SetsUse stored procedures with multiple result sets to load data from the database.
Insert, Update & Delete with Stored ProceduresUse stored procedures to insert, update and delete data.
Map an Entity to Multiple Tables (Entity Splitting)Learn how to map the properties of an entity to columns in multiple tables.
Map Multiple Entities to One Table (Table Splitting)Learn how to map the columns of a table to properties in multiple entities.
Table-Valued Functions (EF5 onwards)Table-valued functions (TVFs) in your database can be used with models created using the EF Designer.
Multiple Diagrams per Model (EF5 onwards)The EF Designer allows you to have several diagrams that visualize subsections of your overall model.
Defining QueriesA defining query is like a view that is defined in your model, rather than the database.
Code Generation TemplatesFind out how to customize the code that is generated from your model.
Reverting to ObjectContextNew models created in VS2012 generate code that uses DbContext, but you can revert to ObjectContext.
EDMX FilesCovers properties of EDMX files and specification of the xml format (including CSDLSSDL & MSL).
Keyboard ShortcutsA helpful list of keyboard shortcuts in Entity Framework Tools for Visual Studio.

Learn More About Using Your Model

Working with DbContextGuidance on how to manage instances of your context class.
Querying/Finding EntitiesLearn how to retrieve data from the database using LINQ and the Find method.
Async Query & Save (EF6 onwards)Asynchronous query and save using the async and await keywords.
Logging and Intercepting Database Operations (EF6 onwards)Anytime EF sends a command to the database this command can be intercepted by application code .
Working with RelationshipsFind out how to access and manipulate data using relationships.
Loading Related EntitiesEF supports the eager, lazy and explicit loading patterns for loading related data.
Working with Local DataAccess your in-memory entity instances and the additional information EF is tracking about them.
N-Tier ApplicationsLearn how to use Entity Framework to build N-Tier applications, including Self-Tracking Entities.
Raw SQL QueriesFind out how to load data from a raw SQL query directly against the database.
ValidationDiscover how Entity Framework can provide server side validation of entities.
Optimistic Concurrency PatternsLearn about the various strategies for dealing with concurrency exceptions in EF.
Working with ProxiesProxies derive from your entities and override virtual properties to enable features such as lazy loading.
Automatic Detect ChangesFind out what detect changes is and when you may want to disable automatic detect changes..
No-Tracking QueriesNo-tracking allows you to query for entities without having the results be tracked by the context.
The Load MethodLoad entities from the database into the context without immediately doing anything with those entities.
Add/Attach and Entity StatesGet familiar with adding and attaching entities and setting entity states in disconnected/N-Tier scenarios.
Working with Property ValuesFind out how to access the current, original and database values for your entity instances.
Testing with a Mocking Framework (EF6 onwards)Create test doubles using a mocking framework (such as Moq).
Testing with Your Own Test Doubles (EF6 onwards)Write your own in-memory implementation of your context and DbSets .
Working with Transactions (EF6 onwards)Learn how to control the use of trasactions with Entity Framework.
Connection Management (EF6 onwards)Learn how to control connection open/close and work with existing database connections.

Using EF With Other Technologies

ASP.NET MVCEF provides the M (Model) in MVC.
ASP.NET Web APIUse EF and ASP.NET Web API to build HTTP services that reach a broad range of clients.
ASP.NET Web FormsFind out how to perform data access in your Web Forms application using EF.
Data Binding with WPF (Windows Presentation Foundation)Learn how to create a master/detail window with WPF data binding using EF for data access.
Data Binding with WinForms (Windows Forms)Learn how to create a master/detail window with WinForms data binding using EF for data access.

No comments:

Post a Comment

Angular Tutorial (Update to Angular 7)

As Angular 7 has just been released a few days ago. This tutorial is updated to show you how to create an Angular 7 project and the new fe...