It's best to demonstrate this issue with a fiddle. The following fiddle is using AutoMapper 12.0.1 and will fail the test.
https://dotnetfiddle.net/Qtvc1Z
The following is the same codes but using AutoMapper 12.0.0 which works judging from the…
I am trying to update some data with some input by HttpPut which has an list of object. But specially I want to update child object's some properties.
Inputs
public class WarehouseInput
{
public string WarehouseCode { get; set; }
public string…
Is there a way to have the EF Core Power Tools create setters for collections, like so:
class Parent
{
// ...
public virtual ICollection Children { get; } // Setter is missing
}
The setter would be extremely useful with…
Migration from .Net 6.0 To .Net 7 Automapper having issues in Startup.cs
Severity Code Description Project File Line Suppression State
Error CS1503 Argument 1: cannot convert from 'System.Reflection.Assembly' to
…
I have a property that is Ignored with Ignore Attribute in a DTO with AutoMap Reverse.
When I try to get from DTO to entity, seem like the ignored attribute is being copied to destiny Entity, wouldn´t it be left on copy when source (dto) has the…
How do I test an Automapper ITypeConverter Converter with a ResolutionContext?
I have a complicated converter and want to test it explicitly.
It needs an argument ResolutionContext which I cannot get to, nor create nor mock.
Is it possible?
public…
When using Internal().AllowAdditiveTypeMapCreation = true;, I was expecting that
CreateMap()
.ForMember(dest => dest.Id, opt => opt.Ignore());
CreateMap()
.ForMember(dest => dest.Name, opt =>…
I'm using Automapper 12 to map a model over an existing EF entity. Ignores are respected on the main entity being updated, but not on the related entities and I'm not quite sure why (lacking proper collections support?)
var model = new User() {
…
I am implementing update user endpoint. During update, I am fetching original entity.
public class UserEntity
{
public Guid Id { get; set; }
public Dictionary> Attributes { get; set; }
}
var user = await…
TL;DR: Is there a way to create a sort of convention or prefix rule that would use the source or destination class names as prefix for some field mappings using AutoMapper 12.0?
I'm experimenting with AutoMapper 12.0 in a dotnet core 6 project and…