Reputation: 3704
I'd like to map from a flattened object to a hierarchical object based on a simple naming convention. For example:
public class FlatObject {
public string Name__FirstName { get; set; }
public string Name__MiddleName { get; set; }
public string Name__LastName { get; set; }
}
public class HierarchicalObject {
public SubObject Name { get; set; }
}
public class SubObject {
public string FirstName { get; set; }
public string MiddleName { get; set; }
public string LastName { get; set; }
}
The simple naming convention is the double-underscore within the FlattenedObject.
How would I accomplish this using EmitMapper?
Upvotes: 0
Views: 113
Reputation: 3704
EmitMapper cannot do this task without significant code changes.
Upvotes: 1