automapper Questions

5

Solved

Automapper is a object-object mapper where we can use to project domain model to view model in asp.net mvc. http://automapper.codeplex.com/ Is there equivalent implementation in Python for use i...
Ammonia asked 28/7, 2010 at 0:1

5

Solved

I am using version 9. I am using a Profile based configuration. When I run the application the Mapper.Map<>() method throws the following exception: JobAssist.Services.ResumeBankMgmt.API.App...
Reedreedbird asked 23/3, 2020 at 0:13

2

Solved

I have the following Automapper defintion: Mapper.CreateMap<IB.BusinessComponents.Data.LocationMaster, IB.Entites.Master.Location>(); Mapper.CreateMap<IB.BusinessComponents.Data.LocationM...
Publisher asked 25/11, 2010 at 11:44

3

Solved

I am trying to use AutoMapper to map my entity with my DTO, but when I try to use dependency injection in program.cs like this: builder.Services.AddAutoMapper(typeof(UserRoleReMapperConfig)); I go...
Olodort asked 13/2, 2024 at 19:48

3

Solved

I am using AutoMapper to convert a UI model to POCOs that I later serialize to XML using a DataContractSerializer in order to preserve the references between them. The problem comes that, when map...
Strow asked 21/5, 2013 at 9:27

2

Solved

Using Visual Studio 2019 I installed AutoMapper version 8.1.0 via NuGet. When I try to add the services.AddAutoMapper() call though in my Startup.cs file I get a compiler error that the method does...
Bernadinebernadotte asked 19/5, 2019 at 20:41

7

Solved

How to configure AutoMapper in ASP.Net Core 6 I have a project which is written in .Net 3.1 so we had Startup.cs class. I am migrating it to .net core 6 now when I put the following configuration i...
Hue asked 22/2, 2022 at 5:3

4

I am throwing custom exceptions inside my resolvers, but they are being caught and wrapped by Automapper so we cant handle them elsewhere in the program. I've included a simple example of the probl...
Bradwell asked 14/3, 2014 at 15:52

4

Solved

Let's assume that I've two classes : CD and CDModel, and the mapping is defined as follows: Mapper.CreateMap<CDModel, CD>() .ForMember(c => c.Name, opt => opt.MapFrom(m => m.Title))...
Brogle asked 25/7, 2011 at 11:52

17

Solved

Entity Model public partial class Categoies { public Categoies() { this.Posts = new HashSet<Posts>(); } public int Id { get; set; } public string Name { get; set; } public string Desc...
Potshot asked 3/2, 2013 at 22:8

4

Solved

When I try to map an object that has a null string property, the destination is also null. Is there a global settings I can turn on that says all null string should be mapped to empty?
Formative asked 3/10, 2011 at 22:16

1

Solved

I developed an ASP.NET Core 6 Web API about a year ago using AutoMapper. It was working then, but suddenly I got this error: Error CS0121 The call is ambiguous between the following methods or pro...
Nonviolence asked 20/2, 2024 at 7:36

13

Solved

I worked on a asp.net core 1.1 project a while ago and use in projetc AutoMapper. in asp.net core 1.1, I add services.AddAutoMapper() in startup file : StartUp file in asp.net core 1.1: public ...
Grof asked 18/5, 2018 at 12:17

2

I'm starting to implement AutoMapper, first I managed to integrate it with Castle.Windsor, which I'm already using. Now I have a Post entity which I want to map to either a LinkPostModel or an Imag...
Boudoir asked 5/8, 2012 at 16:31

4

I am basically trying to implement CRUD using EntityFrameWork core and .Net core 3.1. I have an issue with my update operation where I am not able update the context with the modified value. I am u...
Indented asked 16/7, 2020 at 11:46

5

when using Automaper 10.1.1, with identityserver4 and .net 7, identityserver4 is the last free version of IdentityServer and doesn't work with a higher version of AutoMapper where this issue is res...
Wheeler asked 8/2, 2023 at 15:57

4

ForAllOtherMembers extension method was removed from Automapper 11 I use it to ignore conventional mappings for properties other than the one mentioned before like this ForAllOtherMembers(opt=>o...
Lugger asked 1/3, 2022 at 16:2

7

Solved

I've been looking everywhere: stackoverflow, automapper documentation, internets and just couldn't find any info on this one, even tho this seems to be a very common problem. My mapping: CreateMa...
Narcissus asked 12/5, 2017 at 22:51

19

Solved

Is there a way to tell AutoMapper to ignore all of the properties except the ones which are mapped explicitly? I have external DTO classes which are likely to change from the outside and I want t...
Glia asked 5/6, 2009 at 6:18

10

Solved

I'm using Automapper and I have the following scenario: Class OrderModel has a property called 'ProductName' that isn't in the database. So when I try to do the mapping with: Mapper.CreateMap<O...
Annecorinne asked 14/2, 2011 at 0:22

3

Solved

I am struggling with the Automapper syntax. I have a List of PropertySurveys, each containing 1 Property. I wish to map each item on the collection into a new object which combines the 2 classes. ...
Cry asked 14/12, 2015 at 15:56

5

Solved

Automapper is a way to match types, ideally when you want to map a model and its viewmodel. But is this not the same approach that we can make with implicit in C#? (Suppose that both model have the...
Adhamh asked 25/3, 2015 at 13:34

5

Solved

I try to figure out how to flatten a collection of Merchants, each containing a collection of Orders to a flat List of OrderViewModels. Here my DTO: public class Merchant { public string Merchan...
Jann asked 8/7, 2015 at 6:24

2

Solved

How can i unit test a profile that uses AfterMap with IMappingAction that has an injected service. MappingProfile.cs public MappingProfile() { CreateMap<string, string>() .ConvertUsing<C...
Visually asked 29/1, 2021 at 15:12

3

Solved

I have a Automapper setup that was working on the v10 version but since i updated it to the latest v11, it wont work anymore. I have no clue what could be the issue. The source and destination file...
Timeless asked 21/2, 2022 at 18:10

© 2022 - 2025 — McMap. All rights reserved.