중복이있을 때를 제외하고는 잘 작동하는 Silverlight의 드롭 다운 목록을 채울 C# 코드가 있습니다. 나는 IEnumerable<Insurance.Claims>
가 컬렉션이기 때문에 중복을 제거한다고 생각합니다. 중복을 허용하기 위해 LINQ 쿼리를 어떻게 코딩합니까?ADO.NET 데이터 서비스, LINQ
내 샘플 데이터는 다음과 같습니다
코드 => 코드 명
FGI 필드를 일반 이니셔티브
SRI 정적 자원 이니셔티브
JFI ,합동 현장 이니셔티브 -이 결과에 "덮어 쓰기"입니다
JFI 합동 친구 이니셔티브
IEnumerable<Insurance.Claims> results;
// ADO.NET Data Service
var claim = (from c in DataEntities.Claims.Expand("Claimants").Expand("Policies")
where c.Claim_Number == claimNumber
select c);
DataServiceQuery<Insurance.Claims> dataServiceQuery =
claim as DataServiceQuery<Insurance.Claims>;
dataServiceQuery.BeginExecute((asyncResult) =>
{
results = dataServiceQuery.EndExecute(asyncResult);
if (results == null)
{
// Error
}
else
{
// Code to populate Silverlight form
}
});
IEnumerable은 인터페이스입니다. 아무것도하지 않습니다. 특히 중복을 필터링하지 않습니다. –