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 , is there a solution for this ?I am using it for Asp.net…
I'm trying to replace this manual mapping:
var group = new Group {
Participants = family.Children.ToDictionary(child => $"{child.LastName}, {child.FirstName}", child =>
new Participant
{
Class = child.Age,
…
I'm working with .net6 + Mapster CodeGen + Gitlab.
I'm stuck with deployment process.
One part of pipeline.yml:
screen-1.
Mapster.Tool should be installed on local machine for correct generating mappers.
I'm trying install with next…
Is it possible using Maptser to configure the Map configuration by condition?
puplic static GetCustomConfig(condition)
{
var config = new TypeAdapterConfig();
config.NewConfig()
.Map(dest => dest.Name, src =>…
I have three classes
public class A
{
public string Value1 { get; set; }
public string Value2 { get; set; }
}
public class B
{
public int Value1 { get; set; }
public string Value2 { get; set; }
}
public class C
{
public int…
TypeAdapterConfig.GlobalSettings.ForType(typeof(PagedList<>),typeof(PagedList<>))
for above config constructusing does not appear and can't use.
I try use define constructusing for generic class PagedList
but doesn't appear for this config…
I am Changing the AutoMapper to Mapster and i am new to mapster.
I have two classes like below
public class PayrollLineItems
{
public int PayrollLineItemID{get;set;}
public datetime PlannedStartDate {get;set;}
public datetime PlannedEndDate…
I have a REST API project developed using asp.net core 3.1 for the API tier and there is a class library project which acts as repository layer for the API project. Taking into consideration the complexity of the project the entire repository tier…
Given the following code:
public class POCO {}
public class TestBase {}
public class TestDerivedA : TestBase { public int X {get;set;} }
public class TestDerivedB : TestBase { public POCO X {get;set;} }
class Program {
static void Main(string[]…
I am trying to map a class that has a property that has a circle relationship with another class. These are the three classes:
[DataContract]
public class ClaseTest2
{
[DataMember(Order = 1)]
public ClaseTest3 Clase3 {get; set;…
I need to configure a custom mapping between two generic classes using Mapster.
public class Source
{
public T Value { get; set; }
}
public class Destination
{
public T Value { get; set; }
}
I made the following attempts but the…
I'm using Mapster for mapping and Simple Injector in my .net framework 4.8 MVC and WebApi controllers.
I'd like to inject Mapster as a dependency in my services but I can't figure it out how to make it work with Simple Injector. The Mapster…
I am having a Project on ASP.NET Core-6 Web API using MapsterMapper, Fluent Validation and IMediatR
Interfaces:
public interface IRequestWrapper : IRequest>
{
}
public interface IRequestHandlerWrapper :…