
[英]how can i change table name by fluent API of entity framework code first in c#?
[英]How can I define a column prefix with Entity Framework Fluent API?
我有以下模型:
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; }
}
现在,EF尝试以这种方式首先映射代码模型:
Id | Address | Port | Address | Port
---------------------------------------------------------------------
这显然是行不通的。 如何定义EF应该映射以属性名称为前缀的复杂类型? 如SourceEndpoint.Address等?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.