dto-mapping

Suggestions on how to map from Domain (ORM) objects to Data Transfer Objects (DTO)

The current system that I am working on makes use of Castle Activerecord to provide ORM (Object Relational Mapping) between the Domain objects and the database. This is all well and good and at most times actually works well! The problem comes about with Castle Activerecords support for asynchronous execution, well, more specifically th...

Seperating concerns with Linq To SQL and DTO's

I recently started a new webforms project and decided to seperate the business classes from any DBML references. My business layer classes instead access discrete Data layer methods and are returned collections of DTO's. So the data layer might project DTO's like the following: (from c in dataContext.Customers where c.Active == true se...

What are the advantages and disadvantages of DTOs from a website performance perspective?

What are the advantages and disadvantages of DTOs from a website performance perspective? (I'm talking in the case where the database is accessed on a different app server to the web server - and the web server could access the database directly.) ...

Easy way to translate from DTO to Entity and Entity to DTO?

I have worked on several distributed client/server projects recently, and one pain point that we always run into is translating the DTO objects into our entities and vice-versa. I was wondering if anyone has a "simple" solution to this time sink? One thing I thought about was coming up with some sort of translation using reflection...I...

AutoMapper issue

Trying to automap some objects. Source objects has properties with _ before name, destination objects - have not. Is it possible to implement ONE map creation, that automapper would map all _properties to properties for all source types. class MyMapper<TFrom, TTo>{ TTo PerformMap(TFrom fromObject){ Mapper.CreateMap<From, To>...

How do I turn off AutoMapper auto-list conversion between List<T> and EntitySet<T> ?

I'm mapping my Linq-To-SQL generated entities to DTOs using AutoMapper. When I initially created the unit tests, I had specific maps (through a static configuration class) set up to convert one type of EntitySet to a generic List (and vice-versa) Mapper.CreateMap<EntitySet<Member>, List<MemberDTO>>(); Mapper.CreateMap<List<MemberDTO>...

Alternative to dozer for bean mapping?

I am trying to figure out an easy way to map DTOs to entities without the boiler-plate code. While I was thinking of using dozer it appears to require a lot of xml configuration. Has anybody seen a dozer alternative that uses a DSL to configure the bean mapping in pure Java? Ideally I am hoping to find a bean mapper that is inspired b...