I have the class
public class Email
{
public string Endereco { get; }
public string NomeExibicao{ get; }
}
I'm trying to map to EF Core using the following code
builder.Property(e => e.Email.Endereco)
.HasColumnName("EmailUsuario");
When I try to run the update the following message appears:
The expression 'e = > e.Email.Endereco 'is not a valid property expression. The expression should represent a property access: 't = > t.MyProperty '. Parameter name: propertyAccessExpression
In EF 6 it worked perfectly.
The other mappings of the same Entity are working.