Interface IInjectableService
- Namespace
- Microsoft.EntityFrameworkCore.Internal
- Assembly
- Microsoft.EntityFrameworkCore.dll
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
Implemented by service property types to notify services instances of lifecycle changes.
public interface IInjectableService
Methods
Attaching(DbContext, IEntityType, object)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
Called when an entity that needs this is being attached to a DbContext.
void Attaching(DbContext context, IEntityType entityType, object entity)
Parameters
context
DbContextThe DbContext instance.
entityType
IEntityTypeThe IEntityType of the instance being attached.
entity
objectThe entity instance that is being attached.
Detaching(DbContext, object)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
Called when the entity holding this service is being detached from a DbContext.
bool Detaching(DbContext context, object entity)
Parameters
Returns
Injected(DbContext, object, ParameterBindingInfo)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
void Injected(DbContext context, object entity, ParameterBindingInfo bindingInfo)
Parameters
context
DbContextentity
objectbindingInfo
ParameterBindingInfo