문제

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?

도움이 되었습니까?

해결책

EmitMapper cannot do this task without significant code changes.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top