I have UserType object where Name properties values are UserId, LoginName, Email, ...etc of class Attribute. I need mapping UserType object to User object and reverse mapping from User to UserType . I used AutoMapper library, but I can't implement mapping.
public class UserType
{
public string UserName { get; set; }
public Attribute[] Attribute { get; set; }
}
User attributes class:
public class Attribute
{
public string Name { get; set; }
public string[] Value { get; set; }
}
Attribute example: Attribute attribute = new Attribute { Name = "LoginName ", Value = new []{"LoginName"} }
My User class:
public class User
{
public long UserId { get; set; }
public string LoginName { get; set; }
public string Email { get; set; }
public string LastName { get; set; }
public string FirstName { get; set; }
public string MiddleName { get; set; }
}