automapper-2 Questions

6

I am using automapper to map source and destination objects. While I map them I get the below error. Expression must resolve to top-level member. Parameter name: lambdaExpression I am not abl...
Sofiasofie asked 24/7, 2012 at 14:27

6

Solved

I'm using Automapper to map my NHibernate proxy objects (DTO) to my CSLA business objects I'm using Fluent NHibernate to create the mappings - this is working fine The problem I have is that the ...
Sense asked 16/7, 2012 at 13:15

6

Solved

I am using auto mapping first time. I am working on c# application and I want to use auto mapper. (I just want to know how to use it, so I don't have asp.net app neither MVC app.) I have three ...
Clarkson asked 20/10, 2014 at 4:48

2

Solved

I have a source type which have properties and a destination type which have exactly the same properties. After I configure one simple mapping for AutoMapper like: Mapper.CreateMap<MySourceTyp...
Esme asked 23/4, 2015 at 13:37

3

Solved

What is the best way to map inner objects with Automapper 2.0 Use the solution in this question (Automapper 1.0) Create a Custom Value Resolvers ? public class DTOObject { // MainObject publi...
Lotte asked 2/2, 2012 at 10:34

2

Solved

Today I upgraded a fully functioning application using AutoMapper v1.1 to now use AutoMapper v2.1 and I am coming across some issues that I never encountered using the previous version. Here is an...
Jesseniajessey asked 21/6, 2012 at 21:54

4

Solved

Suppose I have the following entities (classes) public class Target { public string Value; } public class Source { public string Value1; public string Value2; } Now I want to configure Auto...
Olsen asked 23/7, 2013 at 23:47

3

Solved

Suppose i have a source class: public class Source { //Several properties that can be mapped to DerivedBase and its subclasses } And some destination classes: public class DestinationBase { /...
Palua asked 5/2, 2013 at 10:16

3

Solved

I'm trying to use AutoMapper to flatten multiple levels of arrays. Consider the following source classes: class X { public string A { get; set; } public Y[] B { get; set; } } class Y { publi...
Brachycephalic asked 12/11, 2012 at 4:8

3

Solved

I have these classes: public class Person { public int Id{ get; set ;} public string FirstName{ get; set ;} public string LastName{ get; set ;} } public class PersonView { public int Id{ get; ...
Plicate asked 17/1, 2012 at 18:3

5

Solved

Ignoring the ResolveUsing overloads that take an IValueResolver, and looking only at these 2 methods: void ResolveUsing(Func<TSource, object> resolver); void MapFrom<TMember>(Express...
Means asked 14/2, 2013 at 12:38

1

I don't think this is possible, but it's worth the question, I suppose. I have the following types that share an interface (I promise, this isn't the same question I've asked before). public inte...
Sermon asked 6/9, 2012 at 20:20

2

Solved

Can I use inheritance mapping in AutoMapper (v2.2) for maps with the same Source type but different Destination types? I have this basic situation (the real classes have many more properties): pu...
Vine asked 21/12, 2012 at 16:51

2

Solved

I am facing a challenge with AutoMapper between my source object and destination object. I will try to explain the sittuation. On my src object I have an string that according to its lenght it sh...

2

Solved

I have to create a Mapping with automapper. Public class Source { public string Id; public string Firstname; public string Lastname; } Destination is Public class Destination { public stri...
Hopping asked 19/2, 2014 at 10:23

1

Solved

I don't understand why it's overwriting my whole object. The reason is that I get my User object from db an I want to assign new values from DTO. Instead of just adding those new values it's ...
Savoie asked 10/8, 2013 at 15:41

2

Solved

Automapper easily handles mapping one list of object types to another list of different objects types, but is it possible to have it map to an existing list using an ID as a key?
Excelsior asked 10/7, 2012 at 12:24

2

I updated from AutoMapper 2.0.0 to 2.2.0 today and realized the update broke some code. Wanted to ask about it here before posting as an issue on the automapper github site. One of my destination ...
Madid asked 21/11, 2012 at 20:36

1

We have two classes: public class Foo { public int A { get; set; } public int B { get; set; } public int C { get; set; } } public class Bar { public int A { get; set; } public int B { get; s...
Opera asked 10/5, 2013 at 12:48

1

I have the following code: [Test] public void ConditionalMapping() { var src = new Sample1 {Age = 1, Number = null}; var dest = new Sample2 {Age = null, Number = 1}; Hydrate(src, dest, false);...
Akela asked 17/4, 2013 at 15:4

2

I'm currently evaluation whether AutoMapper can be of benefit to our project. I'm working on a RESTful Web API using ASP.NET Web API, and one of the things I must return is a resource that contains...
Grampositive asked 2/4, 2013 at 14:15

1

Solved

I'd like to be able to do something like this using automapper: Mapper.CreateMap<Source, Destination>() .ForMember<d => d.Member, "THIS STRING">(); I'd like d.Member to a...
Diacaustic asked 30/10, 2012 at 20:4

1

Solved

I'm facing a problem with AutoMapper 2.1.267.0 when working with objects containing collections of derived classes. I've isolated my problem in a simpler scenario with the following classes: publi...
Jemmie asked 18/9, 2012 at 18:57

1

Solved

I am using Troy Goode's PagedList to provide paging information in my WebApi. His package returns an IPagedList that implements IEnumerable but also contains custom properties such as IsLastPage, P...
Moonstone asked 18/9, 2012 at 3:54

2

Solved

I have the following model: public class Tag { public int Id { get; set; } public string Name { get; set; } } I want to be able to use AutoMapper to map the Name property of the Tag type to a ...
Hanforrd asked 25/6, 2012 at 12:51

© 2022 - 2024 — McMap. All rights reserved.