Interface IEntityManager
Assembly: Mars.Core.dll
Syntax
public interface IEntityManager
Methods
|
Improve this Doc
View Source
Create<TEntity>(String, String, IReadOnlyCollection<IModelObject>)
Creates a new instance of the specified type an initialize it reading the
data object from the mapping source, using the specified keyAttribute
and the corresponding keyValue
.
Declaration
TEntity Create<TEntity>(string keyAttributeName, string valueToMatch, IReadOnlyCollection<IModelObject> modelSpecificDependencies = null)
where TEntity : IEntity, new()
Parameters
Type |
Name |
Description |
System.String |
keyAttributeName |
The name of the attribute used to identify each data object. |
System.String |
valueToMatch |
The value of the key to identify the data object. |
System.Collections.Generic.IReadOnlyCollection<IModelObject> |
modelSpecificDependencies |
All model-dependent dependencies to passed to create
|
Returns
Type |
Description |
TEntity |
Returns an initialized new instance of .
|
Type Parameters
Name |
Description |
TEntity |
The concrete type to create. |
Exceptions
Type |
Condition |
System.ArgumentException |
The keyAttribute or keyValue is null or an empty string.
The data object for the specified keyValue or the keyAttribute
was not found for type .
|
|
Improve this Doc
View Source
Initialize<TVectorEntity>(TVectorEntity, IDomainData, IReadOnlyCollection<IModelObject>)
Initialize an existing object by the pre defined values of
the input mapping or the given object.
Declaration
TVectorEntity Initialize<TVectorEntity>(TVectorEntity entity, IDomainData data, IReadOnlyCollection<IModelObject> modelSpecificDependencies = null)
Parameters
Type |
Name |
Description |
TVectorEntity |
entity |
A concrete instance of the entity. |
IDomainData |
data |
The data to assign to the entity. |
System.Collections.Generic.IReadOnlyCollection<IModelObject> |
modelSpecificDependencies |
Model-related dependencies which shall be resolved. |
Returns
Type |
Description |
TVectorEntity |
Returns the same with initialized properties. |
Type Parameters
Name |
Description |
TVectorEntity |
The internal type. |
|
Improve this Doc
View Source
Initialize<TVectorEntity>(TypeElement, TypeMapping, TVectorEntity, IDomainData, IReadOnlyCollection<IModelObject>)
Initialize an existing object by the pre defined values of
the given
input mapping or the given object.
Declaration
TVectorEntity Initialize<TVectorEntity>(TypeElement managingType, TypeMapping mapping, TVectorEntity entity, IDomainData data, IReadOnlyCollection<IModelObject> modelSpecificDependencies = null)
Parameters
Type |
Name |
Description |
TypeElement |
managingType |
The type description, containing all properties and references. |
TypeMapping |
mapping |
The mapping configuration of the . |
TVectorEntity |
entity |
A concrete instance of the entity. |
IDomainData |
data |
The data to assign to the entity. |
System.Collections.Generic.IReadOnlyCollection<IModelObject> |
modelSpecificDependencies |
Model-related dependencies which shall be resolved. |
Returns
Type |
Description |
TVectorEntity |
Returns the same with initialized properties. |
Type Parameters
Name |
Description |
TVectorEntity |
The internal type. |
Extension Methods