I have this entity:
public class MyType
{
public Guid Id {get;set;}
public string Name {get;set;}
}
I want to merge two of these types together, but the source Id
needs to be unchanged.
So the objects are filled as such:
From the Database => MyType {
Id: 012312-42134-12321-12,
Name: "This Type"
}
From the View => MySecondType {
Id: null,
Name: "This Type Changed"
}
And I want to merge MySecondType
into MyType
but ignore the Id
field in the merge.
So I thought maybe doing:
Mapper.Map(mySecondType, myType);
To get the database myType
to be filled with the view mySecondType
but there is not setting to ignore a property.