Questions tagged [automapper-3]

Use this tag for version specific questions about AutoMapper 3 - the convention-based object-to-object mapper and transformer library for .NET. When using this tag also include the more generic [automapper] tag where possible.

This release was focussed on a separation for platform deployments, code comments and LINQ projection. Release blog and notes give further details.

128 questions
0
votes
1 answer

Automapper parent-child self referencing loop

I'm trying to map a list model object with a child that has reference to the parent. The Json serialization throws a "Self referencing loop detected" error message. My model classes: public class Event { public int Id { get; set; } public…
Daniel
  • 137
  • 4
  • 10
0
votes
1 answer

AutoMapper and Quartz.Net server - missing type map configuration

I'm attempting to use AutoMapper within Jobs hosted by Quartz.Net server. At service startup, I load all the mapping profiles, one of which has: Mapper.CreateMap(); In the Job, I…
Phil Boyd
  • 380
  • 3
  • 17
0
votes
1 answer

Unsupported Mapping Exception - Missing type map configuration in Automapper?

I'm sure I am missing something simple. First, I'll show all the code I have written to wire up the plumbing, then I'll show the exception message. Then, I'll set out what I have tried to fix it. LicenceTrackerProfile public class…
onefootswill
  • 3,707
  • 6
  • 47
  • 101
0
votes
1 answer

AutoMapper NuGet not building when using Xamarin Studio

I have a solution created by VS2013 and hosted on GitHub and it builds. I tried to build it on Xamarin Studio but it gives me this error Error building target CopyAutoMapperAssembly: Unable to parse condition…
0
votes
1 answer

How to Map Three or N complex Objects to One Object using AutoMapper

I'm new to AutoMapper framework. I have three to Five complex objects which has to be mapped to one object For example ChipInfo, HardDiskInfo, MonitorInfo, MemoryCardInfo has to be mapped to LaptopInfo because LaptopInfo object has fields that has…
AllSpark
  • 425
  • 1
  • 4
  • 17
0
votes
1 answer

Automapper options.ignore() does not work for lists

.ForMember(c = c.Property, options => options.Ignore()) works when you use a single object to map. However, the ignore does not work in the case of lists. For example see below code where destination List object already has some entries and when…
S2K
  • 1,185
  • 3
  • 27
  • 55
0
votes
2 answers

Convert a IEnumerable to IQueryable for using Automapper Extension Project()

We are using stored procedures quite significantly in our application and using LinqToSql to execute our procs and populate the List objects to be returned from DB access methods. However, we need to map some objects to another object type using…
Vikram
  • 6,865
  • 9
  • 50
  • 61
0
votes
0 answers

Automapper complex object mapping NullReference exception

I have the following classes public class Group { public int Id { get; set; } public string Name { get; set; } public virtual ICollection Tiers { get; set; } } public class GroupTier : IEntity { public int Id { get;…
Saanch
  • 1,814
  • 1
  • 24
  • 38
0
votes
2 answers

Automapper Many to one map configuration

I want to map 3 different classes into a single DTO, each property have the same name on the source and the destination, the classes are the following: User Candidate Portfolio this is the DTO and how I want to map my objects: public class…
pedrommuller
  • 15,741
  • 10
  • 76
  • 126
0
votes
1 answer

Automapping based on condition

I'm trying to use Automapper v3 to map from my Post struct to my Postmodel class. I need to map Term Name to my Categories array but only if the Type equals "Category". Here's my code public class NewsModel { public NewsModel(int…
heymega
  • 9,215
  • 8
  • 42
  • 61
0
votes
1 answer

Automapper Mapping Exception despite AssertConfigurationIsValid() success

I am really scratching my head on this. I had updated from Automapper 2.2.1 to 3.1.1 and code that was working before broke. I am trying to get more diagnostic information to debug the actual problem. In the unit test I get a pass since no errors…
jjhayter
  • 352
  • 4
  • 19
0
votes
1 answer

AutoMpper + Map Complex Nested Many to Many Relationship

I have domain model like this public class EntityOne { public int EnityOneId { get; set; } public int EntityOnePropertyOne { get; set; } public List EntityTwos { get; set; } } public class EntityTwo …
Mosby
  • 53
  • 1
  • 8
0
votes
1 answer

AutoMapper Map string to OptionSet value in MS Dynamics CRM

I am using AutoMapper. My source object is simple class public class Source { public string FirstName { get; set; } public string type{ get; set; } } My destination is a MS Dynamics CRM Entity ( I have generated the model…
0
votes
0 answers

Automapper Mapping to a custom collection type using ValueResolver fails

I am trying to map a class, that contains a generic collection, and would like to map that class to another class where the collection is of another custom type. However, when i try to do the mapping i get an AutomapperMapperException. I made a…
carl
  • 375
  • 4
  • 17
0
votes
1 answer

Automapper configuration for object

I have these classes public class NamedEntityViewModel { public string Name { get; set; } } public class NamedEntityListViewModel { public List List { get; set; } } public class…
Sachin Kainth
  • 45,256
  • 81
  • 201
  • 304
1 2 3
8
9