IConventionModelBuilder.CanHaveEntity Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CanHaveEntity(String, Boolean) |
Returns a value indicating whether the given entity type can be added to the model. |
CanHaveEntity(Type, Boolean) |
Returns a value indicating whether the given entity type can be added to the model. |
CanHaveEntity(String, Boolean)
- Source:
- IConventionModelBuilder.cs
- Source:
- IConventionModelBuilder.cs
Returns a value indicating whether the given entity type can be added to the model.
public bool CanHaveEntity (string name, bool fromDataAnnotation = false);
abstract member CanHaveEntity : string * bool -> bool
Public Function CanHaveEntity (name As String, Optional fromDataAnnotation As Boolean = false) As Boolean
Parameters
- name
- String
The name of the entity type.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
true
if the entity type can be added.
Applies to
CanHaveEntity(Type, Boolean)
- Source:
- IConventionModelBuilder.cs
- Source:
- IConventionModelBuilder.cs
Returns a value indicating whether the given entity type can be added to the model.
public bool CanHaveEntity (Type type, bool fromDataAnnotation = false);
abstract member CanHaveEntity : Type * bool -> bool
Public Function CanHaveEntity (type As Type, Optional fromDataAnnotation As Boolean = false) As Boolean
Parameters
- type
- Type
The type of the entity type.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
true
if the entity type can be added.
Applies to
Entity Framework