Say I have a class that is mapping from an EF Core Entity, but I also want to have an alternate route to the same target.
From:
public partial class UnitEntity : ModifiedByBaseEntity
or
public partial class UnitDto : FacetsModifiedByBaseDto;
To:
[Facet(typeof(UnitDto),
Include =
[
nameof(UnitEntity.Name)
])]
public partial class UnitDropDownDto : FacetsModifiedByBaseDto;
[Facet(typeof(UnitEntity),
Include =
[
nameof(UnitEntity.Name)
])]
public partial class UnitDropDownDto : FacetsModifiedByBaseDto;
I could make a manual partial class and add the constructor for it and all the needed projection and such, but that would take away from the idea of automation and would make it cumbersome if changing the target class.
Is there a way to have multiple paths of mapping to the same target?
Say I have a class that is mapping from an EF Core Entity, but I also want to have an alternate route to the same target.
From:
To:
I could make a manual partial class and add the constructor for it and all the needed projection and such, but that would take away from the idea of automation and would make it cumbersome if changing the target class.
Is there a way to have multiple paths of mapping to the same target?