Definition
Assembly: Microsoft.Restier.EntityFramework.dll Namespace: Microsoft.Restier.EntityFramework Inheritance: Microsoft.Restier.Core.ApiBaseSyntax
Summary
Represents an API over a DbContext.Remarks
This class tries to instantiate T with the best matched constructor base on services configured. Descendants could override by registering T as a scoped service. But in this case, proxy creation must be disabled in the constructors of T under Entity Framework 6.Type Parameters
T- The DbContext type.
Constructors
.ctor
Initializes a new instance of the EntityFrameworkApi`1 class.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
serviceProvider | System.IServiceProvider | An IServiceProvider containing all services of this EntityFrameworkApi`1. |
Properties
ContextType
Gets the Context Type.Syntax
Property Value
Type:System.Type
DbContext
Gets the underlying DbContext for this API.Syntax
Property Value
Type:T
Related APIs
- Microsoft.Restier.EntityFramework.IEntityFrameworkApi