Questions tagged [automapper]
A convention-based object-to-object mapper and transformer for .NET.
8 questions
1
vote
1
answer
64
views
Map domain entities using AutoMapper.ProjectTo and clean architecture approach
We have a mid-size project. Two projects in solution, API and Domain.
Domain contains services with business logic. We don't use repositories. Just call DbContext directly from services (that's fine ...
1
vote
2
answers
954
views
Configure lazy and non lazy DI for automapper
I have the following code to register the dependency injection for automapper:
...
2
votes
0
answers
89
views
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
1k
views
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
47k
views
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
103k
views
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.
...
8
votes
2
answers
16k
views
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?
...
4
votes
3
answers
2k
views
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 ...