Mapster
Mapster copied to clipboard
A fast, fun and stimulating object to object Mapper
I am trying to generate a mapper using Mapster.Tool but it crashes as soon as WPF is added as a dependency. Creating a simple console app for .NET6.0-windows works fine,...
I have a similar map config as below and I am trying to do a reverse map. However I get an Invalid Cast Exception when I add the map for...
There's been a few scenarios where I've only had access to a `Type` at runtime and have needed to setup destination mapping rules for these, which isn't possible when there...
I would like to run a specific transform on any DateTime's in my class, but only for those that have a specific custom Attribute applied to their property. This can...
I have a base class with some control fields which are filled at the construction or they will fetch from the related table from database when I use EF. I...
So I'm seeing a limitation with the current capabilities when using a factory method. ## The Problem ### Background Say I have a (simplified) entity that looks like this: ```csharp...
Mapster.Tool does not project types to Dtos when the type is behind an array. Object to map: ``` class A { public B u { get; set; } private B[]...
Tool generates empty mapper: ```csharp [AdaptTo("[name]Dto"), GenerateMapper] public class Author : BaseEntity { public int Id { get; set; } public string Name { get; set; } public virtual ICollection...
I'm not able to map the following custom mapping and this possible with automapper. Any work around. ``` config.NewConfig() .ConstructUsing(x => { //do some custom stuff return new PcrResultDto() {...
Hi, I tried to generate an extension mapper for two classes defined in external assemblies (in attached repo, it's dto and model projects). Running mapster tool does nothing in that...