How to create generic map in Automapper with complex mapping for member
Let’s say I have ResponseModels<T>
and ResponseDTOs<T>
both with properties IEnumerable<T>
and int TotalCount
How to create generic map in Automapper with complex mapping for member
Let’s say I have ResponseModels<T>
and ResponseDTOs<T>
both with properties IEnumerable<T>
and int TotalCount
Why can’t AutoMapper convert a string to a bool when the destination class has a parameterized constructor?
I have a class Destination
with a constructor that takes parameters, and I’m trying to map a Source
object to Destination
using AutoMapper. The mapping for Id
works fine, but the mapping for InStore
doesn’t seem to work when I use a custom mapping. Here is my code:
nullable datetime cannot map through extension method
I encounter a problem when I try to map DateTime? to string,
if source value is null,it will not step in extension method,
do anyone know why?
and I try automapper 10.0 it’s normal!
AutoMapper IValueResolver implementation
I have a complex (entity model) class QuoteVolumeMultiplier
and class:
Are there ways to find missing mappings in Automapper
In the project I’m working, we use Automapper 13.0.1
In C# AutoMapper, how to map a single object to a list containing that single object, in a ProjectTo compatible way?
I have an odd requirement where I need map a single object to a list containing that single object, in a way that doesn’t break IQueryable / ProjectTo mapping.
How to ignore a source property in AutoMapper
Let’s say you have a mapping between a DTO and an entity. Let’s say that the DTO contains some property that you do not want to be mapped to the entity. How can I tell Automapper to not map this property? I know that you can tell Automapper to not map a destination property. However, that will not help me, as I want to tell Automapper to not map a source property. Here is an example:
Bug in AutoMapper AssertConfigurationIsValid() regarding ignored properties starting in v12?
AutoMapper changed the behavior of AssertConfigurationIsValid()
regarding ignored properties in v12. I can’t find anything in the release notes (https://docs.automapper.org/en/latest/12.0-Upgrade-Guide.html) to explain it.