Class EntityManagerImpl
Provides the implementation for the IEntityManager service, which can be used
to create IEntity object from sources.
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Core.Data
Assembly: Mars.Core.dll
Syntax
public class EntityManagerImpl : AbstractEntityManager, IEntityManager
Constructors
| Improve this Doc View SourceEntityManagerImpl(IConfigLoader, ISerializerManager, DefaultSourceProvider)
Creates a new IEntityManager able to resolve and create entity from mappings, getting
from and to register them for output at the .
When entities shall be created ad-hoc the component can be initialized with a
for testing purposes.
Declaration
public EntityManagerImpl(IConfigLoader configLoader, ISerializerManager serializerManager, DefaultSourceProvider defaultSourceProvider = null)
Parameters
Type | Name | Description |
---|---|---|
IConfigLoader | configLoader | The loader keeping references to all configurations and types. |
ISerializerManager | serializerManager | The serializer manager containing all proxy to accessing the model without reflection. |
DefaultSourceProvider | defaultSourceProvider | The optional default dataset container. |
Remarks
When entities shall be created ad-hoc the component can be initialized with a
for testing purposes.
|
Improve this Doc
View Source
EntityManagerImpl(IConfigLoader, ISerializerManager)
Creates a new IEntityManager able to resolve and create entity from mappings, getting
from and to register them for output at the .
Declaration
public EntityManagerImpl(IConfigLoader configLoader, ISerializerManager serializerManager)
Parameters
Type | Name | Description |
---|---|---|
IConfigLoader | configLoader | The loader keeping references to all configurations and types. |
ISerializerManager | serializerManager | The serializer manager containing all proxy to accessing the model without reflection. |
EntityManagerImpl(DataTable)
Creates a new IEntityManager with a pre-defined source in form of a System.Data.DataTable.
Declaration
public EntityManagerImpl(DataTable defaultSource)
Parameters
Type | Name | Description |
---|---|---|
System.Data.DataTable | defaultSource | The source table with all data. |
EntityManagerImpl((Type, DataTable)[])
Creates a new IEntityManager with multiple sources distinguished by their System.Type.
Declaration
public EntityManagerImpl(params (Type, DataTable)[] sources)
Parameters
Type | Name | Description |
---|---|---|
System.ValueTuple<System.Type, System.Data.DataTable>[] | sources |
Methods
| Improve this Doc View SourceCreate<TEntity>(String, String, IReadOnlyCollection<IModelObject>)
Provides the implementation for the IEntityManager service, which can be used
to create IEntity object from sources.
Declaration
public TEntity Create<TEntity>(string keyAttributeName, string valueToMatch, IReadOnlyCollection<IModelObject> modelSpecificDependencies = null)
where TEntity : IEntity, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | keyAttributeName | |
System.String | valueToMatch | |
System.Collections.Generic.IReadOnlyCollection<IModelObject> | modelSpecificDependencies |
Returns
Type | Description |
---|---|
TEntity |
Type Parameters
Name | Description |
---|---|
TEntity |
Initialize<TVectorEntity>(TVectorEntity, IDomainData, IReadOnlyCollection<IModelObject>)
Provides the implementation for the IEntityManager service, which can be used
to create IEntity object from sources.
Declaration
public TVectorEntity Initialize<TVectorEntity>(TVectorEntity entity, IDomainData data, IReadOnlyCollection<IModelObject> modelSpecificDependencies = null)
Parameters
Type | Name | Description |
---|---|---|
TVectorEntity | entity | |
IDomainData | data | |
System.Collections.Generic.IReadOnlyCollection<IModelObject> | modelSpecificDependencies |
Returns
Type | Description |
---|---|
TVectorEntity |
Type Parameters
Name | Description |
---|---|
TVectorEntity |
Initialize<TVectorEntity>(TypeElement, TypeMapping, TVectorEntity, IDomainData, IReadOnlyCollection<IModelObject>)
Provides the implementation for the IEntityManager service, which can be used
to create IEntity object from sources.
Declaration
public TVectorEntity Initialize<TVectorEntity>(TypeElement managingType, TypeMapping mapping, TVectorEntity entity, IDomainData data, IReadOnlyCollection<IModelObject> modelSpecificDependencies = null)
Parameters
Type | Name | Description |
---|---|---|
TypeElement | managingType | |
TypeMapping | mapping | |
TVectorEntity | entity | |
IDomainData | data | |
System.Collections.Generic.IReadOnlyCollection<IModelObject> | modelSpecificDependencies |
Returns
Type | Description |
---|---|
TVectorEntity |
Type Parameters
Name | Description |
---|---|
TVectorEntity |