Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
218 views

I'm working on a high-performance ASP.NET Core Web API where each request can return hundreds of entity records. Each entity includes multiple navigation properties and nested objects. Currently, I’m ...
Mina Golzari Dalir's user avatar
2 votes
1 answer
128 views

I'm working on a .NET 8 project using Microsoft.EntityFrameworkCore 8.0.7 with PostgreSQL as the database. I have a table that contains a jsonb column, and I'm using AutoMapper to map a DTO to the ...
Alparslan ŞEN's user avatar
1 vote
1 answer
552 views

private readonly IMapper _mapper; public CreateDepartmentRequestHandlerTests() { var config = new MapperConfiguration(cfg => cfg.AddProfile(new CreateDepartmentProfile())); _mapper = ...
Saidabror's user avatar
3 votes
1 answer
2k views

I am getting an error Error: CS1729 MapperConfiguration does not contain constructor that takes 1 arguments. from this code: var config = new MapperConfiguration( options => { ...
petrusottie's user avatar
0 votes
1 answer
74 views

I'm using automapper 13.0.1 to map one object to another: CreateMap<CandidateInfoContactDataSendEvent, TechUser>() .ForMember(dest => dest.PhoneNumber, opt => opt.MapFrom(src => src....
Natalia's user avatar
  • 311
3 votes
2 answers
1k views

I installed AutoMapper <PackageReference Include="AutoMapper" Version="15.0.1" /> and created my profile (AutoMapperConfigurationProfile.cs): using AutoMapper; using ...
Filip Z's user avatar
  • 129
3 votes
2 answers
1k views

Problem Description After upgrading to AutoMapper v15.0.1, I encountered the following compile-time error when trying to register AutoMapper manually: services.AddAutoMapper(typeof(AssemblyReference)....
A.SOW's user avatar
  • 31
0 votes
1 answer
117 views

Despite the fact that I explicitly ignore some props - Automapper maps them because source and destination objects have props with the same name (it is known Automapper behaviour). Logic is usual: ...
Ili's user avatar
  • 1
1 vote
1 answer
129 views

I have two models: public class HouseDto { public DateTime[] ProductionDates { get; set; } } and public class House { public string PeriodStart { get; set; } public string PeriodEnd ...
Learner's user avatar
  • 675
0 votes
1 answer
112 views

I have a scenario where data is mapped using Automapper into some target object. The logic, that runs this mapping should be tested with unit tests. Since the target object are quite complex and ...
jholzer's user avatar
0 votes
0 answers
87 views

I use Automapper (v.14) in my .Net MAUI (v.9) app. I configure it as per documentation: mauiAppBuilder.Services.AddAutoMapper(typeof(MappingProfile)); Then I am trying to resolve IMapper object in ...
Dawid's user avatar
  • 87
0 votes
1 answer
109 views

I'm developing a PATCH REST endpoint to do partial update to an EF Core entity. All properties in the request DTO (EntityRequestDto) are marked as nullable, while the actual entity (Entity) will be ...
phwt's user avatar
  • 1,424
-1 votes
1 answer
80 views

Given the following EF Core entity class: [PrimaryKey(nameof(CustomerID))] [Table(nameof(Customer))] public partial class Customer { [DatabaseGenerated(DatabaseGeneratedOption.Identity)] ...
Martin Robins's user avatar
0 votes
2 answers
211 views

I am using JsonDerivedType for polymorphic models in .NET Core, and I need to map a hierarchy of complex model objects to a set of DTO objects for serialization. Specifically, I want to use DTOs with ...
Kafkaa's user avatar
  • 89
3 votes
2 answers
138 views

I'm experiencing an issue where AutoMapper appears to lose a custom comparer when mapping a HashSet property. I have a DTO that contains a collection of strings and a destination model that expects an ...
Vojtěch Večeřa's user avatar
1 vote
2 answers
123 views

In my C# project, I frequently use AutoMapper to map between entities and their corresponding Data Transfer Objects (DTOs). Certain properties, such as SecretValue, should consistently be excluded ...
Azez salami's user avatar
0 votes
1 answer
71 views

I'm trying to map an object of type A with nested object of type NestedType to an object of type B using AutoMapper, but I've encountered some challenges: If we have same name for: propertie with ...
NET-Runner's user avatar
1 vote
1 answer
35 views

I'm using automapper for a dynamic query and it's working well until I use an orderby clause. So this is how I create the query: IQueryable<DTOFormCellSouches> query; //Configuration de l'...
CaptnKebec's user avatar
0 votes
0 answers
70 views

I'm using AutoMapper and I'm wondering if it's possible to count elements in a list. I have List elements and the AutoMapper handle maps each element of that list from the source to the Dest object, ...
infinitesimal's user avatar
0 votes
0 answers
40 views

I'm working on an update feature for my ShopOffer class. When updating, I want to ignore properties that are not included in the update request (i.e., the ones that are null). However, some properties ...
Marko Sami's user avatar
0 votes
1 answer
96 views

I need a way to map a non-generic type into a generic type for deserialization using IValueResolver or IMemberValueResolver I found this documentation that forwards to github tests. The problem is ...
Sebastian Schumann's user avatar
0 votes
2 answers
416 views

I'm using EF Core against a SQL Server database in a Blazor web app (on .NET 9) with Identity, and I am using AutoMapper to convert between the database entities and the DTOs that get sent out of and ...
Avrohom Yisroel's user avatar
0 votes
1 answer
52 views

My database context has a User model and a Company model. Users can be admin, in which case they aren't associated with a company, or they can be one of two other types, in which case they will be ...
Avrohom Yisroel's user avatar
0 votes
1 answer
104 views

For each row in parent table I have many child rows in child table. But child row is unique for each parent row with "JointId" and "NdtId" and when i call "...
Hadi Mazareei's user avatar
2 votes
2 answers
192 views

I have two classes: CustomerLocation and UILocation. Both have a property, called Product but in both cases the type of that Products are different. I'm performing following piece of source code and I ...
Dominique's user avatar
  • 17.6k
0 votes
2 answers
95 views

My handler get all Appointments: public async Task<Result<PagedResult<Responses.AppointmentResponse>>> Handle(Query.GetAppointmentQuery request, CancellationToken cancellationToken) {...
Panda's user avatar
  • 31
1 vote
1 answer
81 views

I'm using Automapper for C# to map an xml object received through an API to a C# model. The xml received may or may not have the same attributes compared to other xml data received through the same ...
AJ M.'s user avatar
  • 13
1 vote
0 answers
288 views

I didn't know when this problem starts to occur, but a few weeks back the AutoMapper package that I download from NuGet works fine, but now, when I try to install Automapper 13.0.1 with always prompt ...
zarielnd's user avatar
0 votes
1 answer
90 views

I have a domain entity KycInformation and I'm using two DTOs to handle different scenarios: KycInformationDto for create operations (no ID needed) KycInformationDetailDto for get/update operations (...
nop's user avatar
  • 6,617
-1 votes
1 answer
79 views

I'm trying to map a nullable property, but the automapper indicates an error in this mapping. Property: HomeTown Source: Person.NaturalPerson.HomeTown Destination: PersonDTO.NaturalPersonDTO.HomeTown ...
Fernando Cristan's user avatar
1 vote
0 answers
45 views

I am trying to convert my data entity IQueryable to domain entity IQueryable in my repository class. The Find() method is used by OData to apply filters. The problem is, when I send an OData query ...
KenAdams's user avatar
0 votes
1 answer
172 views

I have a resolver that returns an IQueryable from Entity Framework Core. When I return the EF Core entity directly, everything works fine. However, when I attempt to map the EF Core entity to my ...
Tundersz's user avatar
0 votes
0 answers
38 views

I'm using Asp.Net with AutoMapper. Say for example I have a User and a UserDto public class User { public string Id { get; set; } = default!; public DateTime CreatedAt { get; ...
White Head Ice Prince's user avatar
3 votes
1 answer
186 views

I have the following scenario with the classes: public class ApiRequest { public int? FwVersion { get; set; } public int? OsVersion { get; set; } public int PageSize { get; set; } ...
Manos Kounelakis's user avatar
0 votes
0 answers
52 views

I am new to using the AutoMapper library for my specific use case. The data flows from stored procedure model in repository to service where it gets mapped to a dto to return to the frontend. This is ...
thespace's user avatar
-1 votes
1 answer
123 views

I'm facing an issue with inserting a derived type of alert in my application. I have a base class, Alert, and its corresponding DTO, along with a derived class, OperationalAlert, which extends Alert, ...
PASHA's user avatar
  • 49
0 votes
2 answers
84 views

I need to apply the following condition ForAllMembers(o => o.Condition((src, dest, srcMember) => srcMember != null)) over multiple map expressions. My objective is to have an object overriding ...
Guilherme Mohr's user avatar
0 votes
0 answers
432 views

We use automapper.data in our project and it works quite well. Now I am experimenting the idea of publishing our project in AOT mode, After adding these in our project file and run our code <...
jerry xu's user avatar
-1 votes
1 answer
65 views

My class XmlOrder contains the two properties public class XmlOrder { public OrderType OrderType { get; set; } public object Item { get; set; } } If OrderType equals OrderType.Service, Item ...
GasPanic's user avatar
2 votes
1 answer
81 views

I have the following classes. public class FieldValue { public string Field { get; set; } public object Value { get; set; } } public class FieldValues { public FieldValue[] Values { get; ...
Petrock's user avatar
  • 21
2 votes
1 answer
107 views

I am looking to map from the list of objects to a class with booleans. I have the following structure from the source: public partial class HomeInfoBuilding : object, System.ComponentModel....
Arun Kumar's user avatar
0 votes
1 answer
526 views

I have a .Net48 solution and I use AutoMapper 10.1.1 in a project. AutoMapper 10.1.1 is the last update that supports .Net48. I have created a Directory.Build.props file in the solution directory ...
HumbleBeginnings's user avatar
0 votes
1 answer
130 views

Source/destination types // Source public record AuthorRequest( string Name, string Biography, DateTime DateOfBirth); // Destination public record AuthorUpdateCommand( Guid Id, ...
Jose Santo's user avatar
-1 votes
2 answers
712 views

I have this EmployeeEntity class which is part of my database context. public class EmployeeEntity { public int Id { get; set; } public string FirstName { get; set; } //more properties }...
LePrinceDeDhump's user avatar
1 vote
2 answers
83 views

I have the following two classes: public class ADto { public int Id { get; set; } public List<BDto>? BSet { get; set; } } public class A { public int Id { get; set; } public ...
CorrieJanse's user avatar
  • 2,598
0 votes
1 answer
113 views

I have a fairly simple AutoMapper setup where I want to map IDictionary<Guid, From> to Dictionary<Guid, To>. This works fine with IMapper.Map, but what I really want to do is use ...
Felix ZY's user avatar
  • 1,004
-1 votes
1 answer
210 views

I have an ASP.NET Core Web API project. In order to configure AutoMapper, I added the following code in my Program.cs file: builder.Services.AddAutoMapper(typeof(Program)); I inject AutoMapper in my ...
MB_18's user avatar
  • 2,501
0 votes
0 answers
54 views

For all OData endpoints in my ASP.NET Core Web API, I return value in this way: { "@odata.context": "...", "@odata.count": 0, "value": [...] } When ...
Silny ToJa's user avatar
  • 2,261
1 vote
1 answer
160 views

I am developing an ABP application with .net core 8. I have an entity Member as public class Member: AuditedAggregateRoot<Guid> { public string MembershipNo { get; set; } public ...
Amour Rashid's user avatar
-1 votes
1 answer
85 views

I have custom resolver for automapper written with automapper 8, after moving to 13 I started noticing below error. How to fix this ? where to look for getting existing mapping inside customer ...
Kaushik Thanki's user avatar

1
2 3 4 5
133