1、 Silverlight 4+Domainservice1,建立好实体框架模型 EDM,单击 Get Column Information 生成新的复杂类型2,在 Your metadata 文件增加复杂类型的定义_Partial Public Class TestSP_ResultFriend NotInheritable Class TestSP_ResultMetadataPrivate Sub New()MyBase.New()End SubPublic Property address As StringPublic Property age As Nullable(Of Integ
2、er)Public Property Class As StringPublic Property Name As StringPublic Property Score As Nullable(Of Decimal)Public Property Gender As StringPublic Property Sum As Nullable(Of Decimal)End ClassEnd Class3,在 your domainservice 文件增加调用方法#Region “SP“Public Function GetTestSP(ByVal gender As String, ByVal address As String) As ObjectResult(Of TestSP_Result)Return Me.ObjectContext.TestSP_Fun(gender, address)End Function#End Region