public System.Data.Objects.ObjectResult<SP1_Result> SP1()
{
System.Data.Objects.ObjectResult<SP1_Result> result = this.ObjectContext.SP1();
return result;
}
When I compile the project, I only got one error saying SP1_Result does not have a Key. So I added a SP1_Result metadata class and tagged the Key field:
[MetadataTypeAttribute(typeof(SP1_Result.SP1_ResultMetadata))]
public partial class SP1_Result
{
internal sealed class SP1_ResultMetadata
{
[Key]
public int MyId;
}
}
After this, I can compile without problem. When I checked Client Side generated code, I can see SP1_Result is generated as Entity class. DomainContext.SP1Query and DomainContext.SP1_Results are available.
The query function also can be written as :
public IQueryable<SP1_Result> SP1()
{
return this.ObjectContext.SP1().AsQueryable();
}
'Silverlight > WCF Ria Service' 카테고리의 다른 글
Silverlight 에서 Ria Service 를 통해 Int 값이나 String 값을 가져오기 (0) | 2010.09.04 |
---|---|
Domain Context 데이터 연속 바인딩 하기 (0) | 2010.08.03 |
Silverlight + Ria Domainservice 연동 (0) | 2010.08.01 |
WCF RIA Services Guide (0) | 2010.07.28 |
[MSDN] System.ServiceModel.DomainServices.Client (0) | 2010.07.28 |
WCF Ria DomainService 를 이용한 데이터 바인딩 (0) | 2010.07.28 |