dotnet / dotnet/EntityFramework.Docs

Model building changes from EF6

Open
#1,989 0 comments 0 reactions 0 assignees View on GitHub
area-model-building
Dominant language
Mermaid
Stars
1.7k
Forks
2k
Avg merge
7d 23h
Merged PRs (30d)
16

Description

- Entity types aren't discovered unless referenced from a DbSet or other entity type.
- Shadow FK column name is different
- `Navigation().IsRequired()` needs to be used instead of `HasRequired()`/`HasOptional`
- `.Map()` functionality is covered by overloads with `StoreObjectIdentifier` parameter
- `MapInheritedProperties()` is replaced by `InheritPropertyMapping()`

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 9cbb86f3-378b-e83d-56c3-c0532192bd13
* Version Independent ID: c96b2fcb-8af0-f05b-e188-a6c59dd9f428
* Content: [Porting from EF6 to EF Core - EF](https://docs.microsoft.com/en-us/ef/efcore-and-ef6/porting/index#feedback)
* Content Source: [entity-framework/efcore-and-ef6/porting/index.md](https://github.com/aspnet/EntityFramework.Docs/blob/master/entity-framework/efcore-and-ef6/porting/index.md)
* Product: **entity-framework**
* Technology: **entity-framework-core**
* GitHub Login: @rowanmiller
* Microsoft Alias: **avickers**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.