Why my type always returns 0?
public class PartiesConfiguracao : EntityConfiguration<Parties>
{
public PartiesConfiguracao()
{
MapHierarchy()
.Case<Parties>(parties => new
{
PartiesID = parties.ID,
ShipInstructionID = parties.ShipInstruction.ID,
ContactID = parties.Co开发者_开发知识库ntact.ID,
parties.Name,
Type = 0,
parties.CNPJ,
parties.Address
})
.Case<Shipper>(parties => new
{
Type = 1
})
.Case<Consignee>(parties => new
{
Type = 2
})
.Case<Notify>(parties => new
{
Type = 3
})
.Case<Forwarder>(parties => new
{
Type = 4
})
.ToTable("si_Parties");
}
}
MapHierarchy is related to CTP4 and has been removed in CTP5. No further support is provided. You should download and install CTP5 from here and try using the new fluent API introduced in CTP5 for your TPH mapping.
精彩评论