Creates a minimal, ad-hoc mapping not associated with any .NET type.

Namespace: Simol
Assembly: Simol (in Simol.dll) Version: 1.0.0.0

Syntax

C#
public static ItemMapping Create(
	string domainName,
	AttributeMapping itemNameMapping
)
Visual Basic
Public Shared Function Create ( _
	domainName As String, _
	itemNameMapping As AttributeMapping _
) As ItemMapping
Visual C++
public:
static ItemMapping^ Create(
	String^ domainName, 
	AttributeMapping^ itemNameMapping
)

Parameters

domainName
Type: System..::..String
Domain where property values will be stored.
itemNameMapping
Type: Simol..::..AttributeMapping
The item name mapping.

Return Value

Remarks

Mappings created with this method include no mapped properties. Desired property mappings must be added explicitly like this:
CopyC#
AttributeMapping itemNameMapping = AttributeMapping.Create("Id", typeof(Guid));
ItemMapping mapping = ItemMapping.Create("Person", itemNameMapping);
AttributeMapping nameMapping = AttributeMapping.Create("Name", typeof(string));
mapping.AttributeMappings.Add(nameMapping);

Guid personId;
PropertyValues values = simol.GetAttributes(mapping, personId);

See Also