Questions tagged [automapper]

A convention-based object-to-object mapper and transformer for .NET.

Filter by
Sorted by
Tagged with
1 vote
2 answers

Configure lazy and non lazy DI for automapper

I have the following code to register the dependency injection for automapper: ...
  • 631
2 votes
0 answers

Mapping an object tree to another object tree

Programming to an interface is a design principle that enhances the flexibility of software by hiding implementation details. Consider an object tree that only exposes an interface, but you want to ...
3 votes
1 answer

AutoMapper DSL (Computation Expression) for F#

I have created a DSL for AutoMapper using an F# Computation Expression Builder. The Computation Builder itself is fairly simple, and effectively defines 5 basic operations: ...
7 votes
2 answers

Class to DataTable or Datatable to class mapper

My code goes from a class to DataTable, and back again. It populates the class's public properties, or creates DataColumns whose ...
21 votes
1 answer

Automapper - Mapping a nested collection to a list

I'm using Automapper to do some mapping from XSD-generated serialization object to more sane POCO's. I'm having an issue with a particular type of mapping. ...
  • 261
7 votes
2 answers

Testing mapping code

Obviously, you have to test mapping code somehow, even (or especially) if you use AutoMapper. Is there any way to make it less verbose? ...
  • 959
4 votes
3 answers

Using AutoMapper to map to and from

Sometimes, I need to map from a Domain entity to a ViewModel - to display information. Other times, I need to map from a ViewModel to a Domain entity - for persistance of data. Is this kosher or ...