Back to list
Views:   0
Replies:  0
Reply 1

I've done similar things, and my suggestions are:
  1. AutoMapper - use this component to automatically map your DTOs to your business objects
  2. Service Layer - I have a service layer for this type of thing.  Gather the objects or collection from your repository, then in the service layer you can map the objects together.

You can find out about AutoMapper at

I hope this helps.

King Wilder

// First configure the mapping...
AutoMapper.Mapper.CreateMap<Source.Entity.Categories, Destination.CategoriesDto>();

// Then map the objects and return the newly mapped object.
CategoryDto dto = AutoMapper.Mapper.Map<Source.Entity.Categories, Destination.CategoriesDto>(entity);

King Wilder, Jun 01, 2012
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas