-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mapping must be called using ServiceAdapter #704
Comments
Stumbled across this issue myself. Using Inject |
My assumption is since Mapster is not exclusively for ASP.Net that the docs relate to the general usage. Accessing DI in the async after-delegate is very specific to ASP.Net though and in this case you're right. The docs should be extended to supply that information for this context. But it only makes sense that in a general scenario where you don't have DI you'd approach it like it is stated in the docs. Took me a while to figure out as well, but I guess this was never considered during the development of Async. In general the Async extension is quite a whacky workaround. It works but I'd say it's not a beautiful implementation. At least I'm having serious issues with it when it comes to polymorphic DTOs... |
Im getting the above error. I cant quite figure out what its supposed to mean.? Looking at this test, I assume that its an old errormessage, and its supposed to be
ServiceMapper
instead ofServiceAdapter
?However, I am already using the
ServiceMapper
like this:I setup my mapping configuration like this:
and using it like this:
The text was updated successfully, but these errors were encountered: