Skip to content

Resolução do mapeamento de construtores. #6

@eglauko

Description

@eglauko

Samples:

// configure the constructor

// the target constructor must have two paramters
builder.Constructor().WithParameters(2);

// the target constructor must have a single parameter of type string
builder.Constructor().WithParameters(typeof(string));

// configure the target constructor parameters with the source properties
builder.Constructor().Parameters(x => x.Name, x => x.Age);

// configure the inner properties of a source property to be mapped to the constructor
builder.Map(x => x.SomeProp).ToConstructor();
// or
builder.Constructor().MapInnerProperties(x => x.SomeProp);

// configure a source property to be mapped to a parameter of the target constructor
builder.Map(x => x.Name).ToConstructor().ToParameter();
// or
builder.Constructor().Map(x => x.Name);

Metadata

Metadata

Assignees

Labels

In progressWork in progressTaskA task to workblockedIssue blocked for some reason

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions