2009-02-09 6 views
0

엔벨로프 컬렉션을 LLBLGen에서 실버 라이트로 다시 전달하는 데 문제가 있습니다. 내 계약은 이렇게 생겼어. 이것이 가능한지 나는 모른다.LLBLGen 엔터티의 IList를 반환하는 Silverlight WCF 액세스?

Error 1 The type or namespace name 'ArrayOfXElement' does not exist in the namespace 'AppointmentClientSL.ServiceReference1' (are you missing an assembly reference?) c:\work\Appointment\Appointment\AppointmentClientSL\Service References\ServiceReference1\Reference.cs 63 54 AppointmentClientSL

:

var client = new Service1Client(); 
client.GetCustomerCompleted += new EventHandler<GetCustomerCompletedEventArgs>(client_GetCustomerCompleted); 
client.GetCustomerAsync(2,"110865"); 

컴파일이 오류와 함께 실패 ... 내가 뭘 실버 라이트 클라이언트에서

public IEnumerable<WaterWorksCustomersEntity> GetCustomer(long custId, string acctKey) 
{ 
    var toReturn = new WaterWorksCustomersEntity(custId, acctKey); 
    using (var adapter = new DataAccessAdapter()) 
    { 
     adapter.ConnectionString = "data source=CWCPROD.cwc.local;user.."; 
     adapter.FetchEntity(toReturn); 
    } 
    IList<WaterWorksCustomersEntity> customers = new List<WaterWorksCustomersEntity>(); 
    customers.Add(toReturn); 
    return customers; 
} 

:

내 웹 서비스 코드는 다음과 같습니다

SL이 웹 서비스가 반환하는 데이터를 처리 할 수없는 것처럼 보입니다.

아무도 도와 줄 수 있습니까 ??? 여기 LLBLGEN 웹 사이트에 WCF를 통해 LLBLGEN를 호출의 예입니다

답변

0

실버 라이트는 구축이다 다른 .NET 프레임 워크를 사용할 수 없으므로 해당 엔티티 유형을 해당 플랫폼에서 사용할 수 없습니다. 엔티티 클래스를 실버 라이트로 보내려면 DTO 클래스를 사용하십시오. 우리 포럼에는 헬퍼 코드 + DTO 클래스를 생성 할 수있는 몇 가지 템플릿이 있습니다. 'DTO 템플릿'을 검색하십시오.