2011-01-03 4 views
0

왜 내 형식이 항상 0을 반환합니까?코드 첫 번째 CTP4 오류 매퍼

public class PartiesConfiguracao : EntityConfiguration<Parties> 
{ 
    public PartiesConfiguracao() 
    { 
     MapHierarchy() 
     .Case<Parties>(parties => new 
     { 
      PartiesID = parties.ID, 
      ShipInstructionID = parties.ShipInstruction.ID, 
      ContactID = parties.Contact.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"); 
    } 
} 

답변

0

MapHierarchy는 CTP4 관련되고 CTP5 제거되었다. 추가 지원은 제공되지 않습니다. here에서 CTP5를 다운로드하여 설치하고 TPH 매핑을 위해 CTP5에 도입 된 새로운 유창한 API를 사용해보십시오.

관련 문제