我已經添加了我的域服務,但是當我構建我的Web項目時,DomainContext永遠不會生成。我是RIA Services的新手,想要學習,但我很困惑。沒有在RIA Service for Silverlight 4中生成DomainContext
這裏是我的域名服務
Option Compare Binary
Option Infer On
Option Strict On
Option Explicit On
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.ComponentModel.DataAnnotations
Imports System.Linq
Imports System.ServiceModel.DomainServices.Hosting
Imports System.ServiceModel.DomainServices.Server
Imports Wellness.BL
Imports System.Collections.ObjectModel
'TODO: Create methods containing your application logic.
<EnableClientAccess()> _
Public Class EventScheduleService
Inherits DomainService
Public Function GetEventSchedule(ByVal ScheduleYear As Integer) As IEnumerable(Of Models.EventSchedule)
Return DataServices.EventSchedulesDataService.GetEventSchedule(ScheduleYear)
End Function
End Class
您是否添加了RIA服務鏈接? [如何:添加或刪除RIA服務鏈接](http://msdn.microsoft.com/en-us/library/ee707372(v = vs.91).aspx) – Kinnara 2011-03-28 20:41:09
我去我的Silverlight項目屬性下silverlight標籤,並將WCF RIA Services鏈接設置爲我的Wellness.Web,它是asp.net Web應用程序。這是我試圖遵循的博客... http://msmvps.com/blogs/deborahk/archive/2009/11/05/silverlight-ria-services-and-your-business-objects.aspx?CommentPosted = true#commentmessage – Spafa9 2011-03-28 20:43:08