diff --git a/entity-framework/core/miscellaneous/plugins.md b/entity-framework/core/miscellaneous/plugins.md new file mode 100644 index 0000000000..a7ed041470 --- /dev/null +++ b/entity-framework/core/miscellaneous/plugins.md @@ -0,0 +1,37 @@ +--- +title: Plug-in APIs - EF Core +description: APIs extensions can use to plug into certain Entity Framework Core components +author: bricelam +ms.date: 8/31/2023 +uid: core/miscellaneous/plugins +--- +# Plug-in APIs + +EF Core extensions often require adding logic to core EF and provider components. This usually requires creating a derived component and replacing the original one in the internal service provider. This gets complicated when multiple extensions want to change the same component. In these cases, we provide plug-in APIs to allow multiple extensions to provide additional logic. + +## List of services + +The following is a list of plug-in APIs. + +Service | Description +--------------------------------------------------------------------------------------------- | ----------- + | Adds mappings between .NET types and primitive store types. + | Adds mappings between .NET types and primitive relational database types. + | Adds model building conventions. + | Adds SQL translations for .NET properties. + | Adds SQL translations for .NET methods. + | Adds SQL translations for .NET enumerable methods. + | Forces server-eval of certain expressions. + | Scaffolds provider and DbContext options. + +## Examples + +Here are some extensions making use of these APIs: + +Extension | Description +--------- | ----------- +[Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite](https://github.com/dotnet/efcore/tree/main/src/EFCore.Sqlite.NTS) | Adds type mappings and SQL translations for SpatiaLite's types. +[Microsoft.EntityFrameworkCore.SqlServer.HierarchyId](https://github.com/dotnet/efcore/tree/main/src/EFCore.SqlServer.HierarchyId) | Adds type mappings and SQL translations for SQL Server's hierarchyid type. +[Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite](https://github.com/dotnet/efcore/tree/main/src/EFCore.SqlServer.NTS) | Adds type mappings and SQL translations for SQL Server's geography and geometry types. +[EFCore.CheckConstraints](https://github.com/efcore/EFCore.CheckConstraints) | Adds model building conventions for relational database check constraints. +[EFCore.NamingConventions](https://github.com/efcore/EFCore.NamingConventions) | Adds model building conventions for alternative relational database table, column, and constraint names. diff --git a/entity-framework/toc.yml b/entity-framework/toc.yml index 4f0bb829d7..b7445faeab 100644 --- a/entity-framework/toc.yml +++ b/entity-framework/toc.yml @@ -368,6 +368,8 @@ href: core/miscellaneous/context-pooling.md - name: Support multi-tenant databases href: core/miscellaneous/multitenancy.md + - name: Plug-in APIs + href: core/miscellaneous/plugins.md - name: Database providers items: