MapsterMapper / Mapster

A fast, fun and stimulating object to object Mapper
MIT License
4.29k stars 327 forks source link

Looping or stackoverflow with Linq-to-Sql entities #584

Closed shakir-timur closed 1 year ago

shakir-timur commented 1 year ago

I've encounterd this issue while trying to map some linq2sql class to a model using Adapt extension method. Original issue was infinite looping at the mapping moment. While I cannot reproduce looping, I have other example that causes stackoverflow.

Demo attached. MapsterInfiniteLoop.zip

andrerav commented 1 year ago

Please take a look at the documentation here: https://github.com/MapsterMapper/Mapster/wiki/Object-references