I want to somehow map entity object to business object using reflection in c# -
public class Category
{
public int CategoryID { get; set; }
http://automapper.codeplex.com/
My vote is for auto mapper. I currently use this. I've done performance tests on it, and although it is not as fast as hand mapping (below):
Category c = new Category
{
id = entity.id,
name = entity.name
};
The trade off for mapping automatically makes it an obvious choice, at least for the entity to business layer mapping. I actually hand map from the business layer to the view model because I need the flexibility.