Skip to content

Mapping generics #357

Answered by micalevisk
PieterBoeren asked this question in Q&A
Oct 12, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

you can't use it like that because <TViewModel, TDto> is just typing stuff that cannot be read at compile nor at run time (generally speaking), thus you need to tell to AutoMapper what are the source and destination classes

See https://github.com/microsoft/TypeScript/wiki/FAQ#what-is-type-erasure

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@PieterBoeren
Comment options

@nartc
Comment options

Answer selected by PieterBoeren
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants