Mapster
Mapster copied to clipboard
A fast, fun and stimulating object to object Mapper
Here is my code: ``` C# public static TTarget CopyTo(this TSource source, TTarget target, params Expression[] members) { if (source == null) return default; var config = TypeAdapterConfig .NewConfig() .IgnoreNullValues(true);...
When using the c#11.0 required feature, the generated mappers fail. Editinh Sample.CodeGen for example: ```cs public class Person { public required int ID { get; set; } public string LastName...
I have an entity class with this fluent API (I do not use data declaration attributes) this is what I have generated is there a chance I can somehow translate...
I am trying to generate a model that will combine two classes (named `MainContext` and `TechContext`). So I've created another class that contains two properties of this classes: ```c# public...
I am receiving this error " The type initializer for 'Mapster.TypeAdapterConfig' threw an exception " on mapster 7.2.0 , couldnt use theupdated version cause it breakes my azure msbuild ,...
Thanks for a great and useful package! We are using RequireDestinationMemberSource and it works well: - **RequireDestinationMemberSource:** "Forcing all destination properties to have a corresponding source member or explicit mapping/ignore"...
When i use Include() in the Lambda expression and try to use Adapt to mapping, the App crashes, and mapping doesn't work. - Include() in the Lambda without Adapt works...
Hi, i have copied this instructional from doc for auto regenerated mappers.  But it works with one step skip. I mean, when it first builds, it generates files, when...
I Expected RequireDestinationMemberSource to propagate to dependent child classes. ```cs [AdaptFrom(typeof(A), RequireDestinationMemberSource = true), GenerateMapper] public class ADto { public string NonExistentInSource { get; set; } /* Failure */ public...
Using the static `Adapt` method, I adapt from a concrete type to an interface (all properties defined w/ `get` & `set`). All is well and the expected property values are...