Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quote the code to remove incorrectly parsed HTML tag #3379

Merged
merged 1 commit into from
Aug 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion entity-framework/core/modeling/keyless-entity-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Some of the main usage scenarios for keyless entity types are:
Mapping a keyless entity type to a database object is achieved using the `ToTable` or `ToView` fluent API. From the perspective of EF Core, the database object specified in this method is a _view_, meaning that it is treated as a read-only query source and cannot be the target of update, insert or delete operations. However, this does not mean that the database object is actually required to be a database view. It can alternatively be a database table that will be treated as read-only. Conversely, for regular entity types, EF Core assumes that a database object specified in the `ToTable` method can be treated as a _table_, meaning that it can be used as a query source but also targeted by update, delete and insert operations. In fact, you can specify the name of a database view in `ToTable` and everything should work fine as long as the view is configured to be updatable on the database.

> [!NOTE]
> Until EF Core 5.0 `ToView` assumed that the object already exists in the database and it won't be created by migrations. In EF Core 5.0 and later use modelBuilder.Entity<ViewType>().ToTable("ViewNameInDatabase", t => t.ExcludeFromMigrations()) to exclude the object from migrations, see [ToView() is treated differently by migrations](xref:core/what-is-new/ef-core-5.0/breaking-changes#toview).
> Until EF Core 5.0 `ToView` assumed that the object already exists in the database and it won't be created by migrations. In EF Core 5.0 and later use `modelBuilder.Entity<ViewType>().ToTable("ViewNameInDatabase", t => t.ExcludeFromMigrations())` to exclude the object from migrations, see [ToView() is treated differently by migrations](xref:core/what-is-new/ef-core-5.0/breaking-changes#toview).

## Example

Expand Down