C
C#6mo ago
Anton

Mapping metadata

Is there a mapping library that doesn't only do mapping, but can also map a PropertyInfo to the associated PropertyInfo in the other type? I wanted to propagate MaxLength from IModel of ef core to the dto's by backward mapping the entity back to the dto. I could do this by name only, but that obviously won't work the moment some name is different.
3 Replies
Anton
AntonOP6mo ago
I've made a more detailed issue on Mapster https://github.com/MapsterMapper/Mapster/issues/721
GitHub
Inspecting property maps for validation and copying of metadata · I...
My problem is that I want to be able to propagate metadata managed by EF Core (for example, MaxLength which can be looked up through IModel) all the way to the frontend, including DTO validation (I...
jcotton42
jcotton426mo ago
Just map by hand, tbh.
Anton
AntonOP6mo ago
You didn't read the question mapping by hand doesn't solve this problem

Did you find this page helpful?