Skip to main content

Definition

Assembly: Microsoft.EntityFrameworkCore.dll Namespace: Microsoft.EntityFrameworkCore

Syntax

Summary

This type is defined in Microsoft.EntityFrameworkCore.

Remarks

See Microsoft documentation for more information about the rest of the API.

Methods

AddMcpTasksTable Extension

Extension method from Microsoft.EntityFrameworkCore.McpEssentials_EntityFrameworkCore_DbContextOptionsBuilderExtensions
Maps McpTaskEntity to table McpTasks after the host OnModelCreating. Call from AddDbContext in the application project.

Syntax

Parameters

Returns

Type: Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<TContext> The same optionsBuilder.

Type Parameters

Exceptions

Remarks

Use this from AddDbContext in the application project when the DbContext type lives in a library that must not reference this package. The mapping runs after OnModelCreating on the same host context. Use ModelBuilder.AddMcpTasksTable in OnModelCreating when the context project already references this package. Pick one. Run dotnet ef migrations add with this project as the startup project so the table is included. A migration from a project that does not call this method will not see McpTasks.

AddMcpTasksTable Extension

Extension method from Microsoft.EntityFrameworkCore.McpEssentials_EntityFrameworkCore_DbContextOptionsBuilderExtensions
Maps McpTaskEntity to tableName in schema after the host OnModelCreating. Call from AddDbContext in the application project.

Syntax

Parameters

Returns

Type: Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<TContext> The same optionsBuilder.

Type Parameters

Exceptions

Remarks

Use this from AddDbContext in the application project when the DbContext type lives in a library that must not reference this package. The mapping runs after OnModelCreating on the same host context. Use ModelBuilder.AddMcpTasksTable in OnModelCreating when the context project already references this package. Pick one. Run dotnet ef migrations add with this project as the startup project so the table is included. A migration from a project that does not call this method will not see McpTasks.