我已经添加了我的域服务,但是当我构建我的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