Hi ,
I just observed the behavior of AutoMapper to be different than what could be assumed.
Scenario :
Suppose there are 2 Classes I am trying to Map :
Class PersonModel
{
public String UserName { get; set; }
}
Class PersonEntity
{
public String user_name{ get; set; }
}
Which Automapper Succesfully was able to Map automatically. Whereas .Net Framework will allow 2 Different properties having "_" separated names for 2 different Properties into the Same class and will compile Succesfully.
Suppose:
Class PersonModel
{
public String UserName { get; set; }
public String user_name { get; set; }
}
But if this occurs in case of AutoMapper which one would AutoMapper Map ?
Besides this, is this a Valid behaviour ? This seems non - obvious.