Skip to content
Open
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
10 changes: 9 additions & 1 deletion entity-framework/core/modeling/entity-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Entity Types - EF Core
description: How to configure and map entity types using Entity Framework Core
author: AndriySvyryd
ms.date: 10/25/2021
ms.date: 08/19/2026
uid: core/modeling/entity-types
---
# Entity Types
Expand Down Expand Up @@ -83,6 +83,14 @@ Rather than specifying the schema for each table, you can also define the defaul

Note that setting the default schema will also affect other database objects, such as sequences.

## Table triggers

You can use the Fluent API to specify that a database trigger exists for a table:

[!code-csharp[HasTrigger](../../../samples/core/Miscellaneous/NewInEFCore7/SaveChangesPerformanceSample.cs?name=HasTrigger)]

Calling `HasTrigger` only registers the trigger in the EF model. EF migrations don't create the trigger in the database; add the trigger DDL to a migration using [`migrationBuilder.Sql`](xref:core/managing-schemas/migrations/managing#arbitrary-changes-via-raw-sql).

## View mapping

Entity types can be mapped to database views using the Fluent API.
Expand Down
Loading