Click or drag to resize

LinqUtilsCreateEntityInstanceFromEntityType Method

Creates a new entity instance from the type specified. This routine uses a factory related to the type, not Activator, as some abstract entities may be used which don't have a public ctor. Falls back to activator if type is a custom type derived from an entity class.

Namespace:  SD.LLBLGen.Pro.LinqSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.6.0.0 (5.6.19.0117)
Syntax
public static IEntityCore CreateEntityInstanceFromEntityType(
	Type entityType,
	IElementCreatorCore generatedCodeElementCreator
)

Parameters

entityType
Type: SystemType
Type of the entity.
generatedCodeElementCreator
Type: SD.LLBLGen.Pro.ORMSupportClassesIElementCreatorCore
The generated code element creator.

Return Value

Type: IEntityCore
ready to use entity instance
See Also