Class DbContextExtensions
- Namespace
- JsonApiDotNetCore.Repositories
- Assembly
- JsonApiDotNetCore.dll
[PublicAPI]
public static class DbContextExtensions
- Inheritance
-
DbContextExtensions
- Inherited Members
Methods
GetTrackedIdentifiable(DbContext, IIdentifiable)
Searches the change tracker for an entity that matches the type and ID of identifiable
.
public static object? GetTrackedIdentifiable(this DbContext dbContext, IIdentifiable identifiable)
Parameters
dbContext
DbContextidentifiable
IIdentifiable
Returns
GetTrackedOrAttach(DbContext, IIdentifiable)
If not already tracked, attaches the specified resource to the change tracker in Unchanged state.
public static IIdentifiable GetTrackedOrAttach(this DbContext dbContext, IIdentifiable resource)
Parameters
dbContext
DbContextresource
IIdentifiable
Returns
ResetChangeTracker(DbContext)
Detaches all entities from the change tracker.
public static void ResetChangeTracker(this DbContext dbContext)
Parameters
dbContext
DbContext