Skip to content
This repository was archived by the owner on Jan 16, 2022. It is now read-only.
This repository was archived by the owner on Jan 16, 2022. It is now read-only.

Generating mapping expression for C# 9 positional records #170

@kszicsillag

Description

@kszicsillag

Feature description
I am trying to generate mapping expressions between EF entity model and a DTO model. The DTO model consists of C#9 positional records. I could not generate proper DTO constructor for these expressions using any generation option.

The scenario is same as below, except filling a multi-parameter constructor instead of an initialization block as C# 9 positional records are initialized through constructor instead of initialization block.
initialization block in lambda expression

Reasoning behind
Generating expressions do work for initialization blocks. Generating pure mapping methods do work with positional records as mapping target. Generating expressions for positional records should work as well.

Real word example of the usage
Positional record is an emerging new concept, expecting to see more DTO models implemented as positional records.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions