I have the following model:
public class TranscoderConfiguration {
public int Id { get; set; }
public NetworkEndpoint SourceEndpoint { get; set; }
public NetworkEndpoint DestinationEndpoint { get; set; }
}
public class NetworkEndpoint {
public byte[] Address { get; set; }
public int Port { get; set; }
}
Now EF tries to map the code first model this way:
Id | Address | Port | Address | Port
---------------------------------------------------------------------
Which obviously doesn't work. How can I define that EF should map complex types prefixed by their property name? Such as SourceEndpoint.Address etc?