You cannot post messages because only members can post, and you are not currently a member.
|
AutoMapper and ServiceLocator
|
| |
Hello, In my global.asax I have the following line: Mapper.Configuration.Construct ServicesUsing(x => ServiceLocator.Current.GetInst ance(x)); And I the mapper is configured as follows: public void CreateMap(IProfileExpression mapper){ // more stuff mapper.CreateMap<ThisClass, ThatClass>() .ForMember(dest => dest.ThatProperty, opt => opt.ResolveUsing<ThatPropertyR esolver>());... more »
|
|
Enabling tracing within AutoMapper
|
| |
Hello, Does AutoMapper support tracing through a TraceSource? Every now and then I encounter some odd behavior with AutoMapper, which is usually a result of misconfiguration. However, I have no visibility into what AutoMapper is doing below the covers and thus it makes it time consuming to find the... more »
|
|
Destination as interface but need concrete class
|
| |
Started using Automapper for the first time a month or so ago and I love it. However, I've run into an issue with collections of interfaces inside a concrete object. I have the following scenario: class SomeClassDTO { public ICollection<AnotherClassDTO> OtherClasses; ...class AnotherClassDTO { public PropertyA {get;set;}... more »
|
|
Is it possible to pass in an argument to BeforeMap?
|
| |
Admittedly, this is a problem that's been plaguing me for months. And, Jimmy is likely sick of me bugging him about it. The long and short of it is that when I try to map from a view model to an EF4 entity graph, the ObjectContext's connection is disposed. When I use my own crappy static mapper, everything works. The only appreciable difference is that I pass... more »
|
|
Question/problem with mapping a derived type to base type
|
| |
Sorry if this question is a noob question, it may well be.
tl;dr version:
If I map a derived class instance to a base class instance, it still
returns me an instance of the derived class. Is this right? How do I
force it to return a true instance of the base?
Long version:
So I've got two classes:... more »
|
|
Map from Com-Object
|
| |
Hi
I have a Com-Object as a mapping source and I'm unable to map from it.
Is there any known issue about this or am I just wrong? :-)
Here's my mapping:
Mapper.CreateMap<ContactItem, Contact>()
.ForMember(x => x.Picture, opt => opt.Ignore());
// ContactItem is the Interop-Class... more »
|
|
My post is missing...
|
| |
Posted a question about AutomapperAssist, and other uses of private mappers, and it's disappaeared?? Anyone know why?
|
|
Automapper/AutomapperAssist - private mappers
|
| |
Hi, We're using automapper extensively in a fairly large project for mapping a lot of db based domain objects to views, DTO's and the like. Every now and again we come across issues where private mappers, or scoped mappers, would solve the problem, but so far we've worked around it, mainly because it seemed like there wasn't a great widely-accepted solution.... more »
|
|
Conditional mapping using attributes
|
| |
Hello, I have tens of entities that require mapping. There are some cases where mapping should only occur if certain conditions are met, like for certain people that belong to a certain group. In order to achieve the high level of reuse, I'd like to define an attribute, say "MapIfInRole" and use it as... more »
|
|
.net 4 ISet<>?
|
| |
I'm sorry if this question has been answered, but is the .net 4 ISet
supported? It doesn't appear to be from the documentation.
If not, any plans to add it? Is there any way to configure it in
ourselves?
Thanks
|
|
|