Issue in mapping after migration to .NET MAUI #683
Unanswered
dharamhbtik
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are using Mapster in Xamarin forms (.Net Standard 2.1) and it is working fine.
We are now migrating our application to .NET MAUI with .NET 8 . the same code we have ported to .NET MAUI from Xamarin and upgraded the Mapster to the latest version 7.4.0 and in Xamarin Forms we are using 7.3.0
Now after upgrade in MAUI, DTO to Model is working fine but Model to DTO is giving exception. We haven't made nay changes to Model class. We are using Realm database and each model is implementing IRealmObject.
below is the exception sample . And this error is coming while registering the classes inside IoC container.
[DOTNET] App:Exception ArgumentTypesMustMatch [DOTNET] App:Exception ArgumentTypesMustMatch [DOTNET] App:StackTrace [DOTNET] App:Exception Error while compiling [DOTNET] source=MyApp.Model.MyModelItems [DOTNET] destination=MyApp.Model.MyModelItemsDto [DOTNET] type=Map [DOTNET] App:StackTrace [DOTNET] App:Exception Error while compiling [DOTNET] source=MyApp.Model.MyModelItems [DOTNET] destination=MyApp.Model.MyModelItemsDto [DOTNET] type=Map [DOTNET] App:StackTrace at Mapster.TypeAdapterConfig.CreateMapExpression(CompileArgument arg) [DOTNET] at Mapster.TypeAdapterConfig.CreateMapExpression(TypeTuple tuple, MapType mapType) [DOTNET] at Mapster.TypeAdapterConfig.Compile(Boolean failFast) [DOTNET] App:Exception Arg_TargetInvocationException [DOTNET] App:StackTrace [DOTNET] App:Exception Error while compiling [DOTNET] source=MyApp.Model.MyModelItems [DOTNET] destination=MyApp.Model.MyModelItemsDto [DOTNET] type=Map [DOTNET] App:StackTrace [DOTNET] App:Exception Error while compiling [DOTNET] source=MyApp.Model.MyModelItems [DOTNET] destination=MyApp.Model.MyModelItemsDto [DOTNET] type=Map [DOTNET] App:StackTrace
Beta Was this translation helpful? Give feedback.
All reactions