Mapster
Mapster copied to clipboard
A fast, fun and stimulating object to object Mapper
To reproduce : ````c# TypeAdapterConfig.GlobalSettings.RequireExplicitMapping = true; class B{ public int id; } [Mapper] public interface IDemoMapping { B Map(B b); } ````
````c# [Mapper] public interface IMyMapper{ B Map(A a, string arbitraryString, int anotherParam ); } class A{ string Name; } class B{ string Name; // maps directly from A.Name string Val;...
I've managed to isolate and replicate my issue in a couple of unit tests, can see here: https://github.com/MitchellW-DWL/MapsterIssue But I can also see this case should be covered by: https://github.com/MapsterMapper/Mapster/blob/master/src/Mapster.Tests/WhenIncludeDerivedClasses.cs...
``` using Mapster; using MapsterMapper; var foo = new Foo(1, 2); var t = foo.Get(); // var bar = t.Adapt(); //
I have the following classes: ScheduleWrapper ``` public Guid ID { get; set; } public Guid? CompanyID { get; set; } public CItyWrapper City {get;set;} public CItyWrapper City1 {get;set;} ```...
Related to #388 #370 Issue still occurs for capitalized names such as: ModelUID ``` myModel.Adapt(); public class MyModel { public string int Id { get; set; } public string ModelUID...
Hi, I would like to know which fields have been changed after mapping entities using [Mapster], in order to facilitate the creation of audit logs in the future. Does Mapster...
For the following classes ```csharp public class Source { public DateTime Time { get; set; } } public class Destination { public int Number { get; set; } } ```...
### Discussed in https://github.com/MapsterMapper/Mapster/discussions/688 Originally posted by **akordowski** March 24, 2024 Hi everyone! I am currently struggling with the mapping of a readonly ICollection property. I followed the [instructions](https://github.com/MapsterMapper/Mapster/wiki/Mapping-readonly-prop) but...
"I’m working with a complex model. When I need to update an instance of this model, I want to avoid changing certain fields like createDate. Currently, I can't achieve this...