0
我有一个使用RIA服务传递给lightswitch的服务类。服务类使用自定义类型而不是本机lightswitch或SQL类型。如何通过lightswitch使用RIA服务中的自定义类型?
public class MyService : DomainService
{
[Query(IsDefault = true)]
public IQueryable<MyRecord> GetMyRecordData()
{
return ...
}
}
public class MyRecord
{
[Key]
public int Id {get; set;}
public string Text {get;set;}
public MyCustomType Custom {get;set;}
}
public struct MyCustomType
{
public MyCustomType (int val1, int val2) : this()
{
Val1 = val1;
Val2 = val2;
}
public int Val1 {get; private set;}
public int Val2 {get; private set;}
}
如何让lightswitch使用此自定义类型进行显示?