wcf-ria-services

RIA Services Vs. WCF and Shared Code

落花浮王杯 提交于 2019-12-10 09:36:36
问题 We're starting to develop a new Silverlight LOB application where the DataAccess will not be based on EF, rather our own DAL code (for legacy and other not related reasons). We are currently debating whether to use RIA Services or simple WCF Services as the Silverlight's facade layer. The options: RIA Services and generated code: RIA Services will automagically create proxy classes of our Domain Model and DomainServices in our Silverlight project. This will mean that our services will need to

How Can I Extend A Entity When Using RIA Services With Silverlight?

天涯浪子 提交于 2019-12-09 17:31:44
问题 On the server side of my Silverlight solution, I have 2 projects. Website that serves up the Silverlight page. A Entity Framework data access layer. I have a entity with FirstName and LastName properties on it. I want to add a FullName property that will be available from the Silverlight client side. I have added the property: namespace Server.DAL.Model { public partial class Contact { public string FullName { get { return string.Format("{0} {1}", this.FirstName, this.LastName); } } } } When

Alternative to Using an Entity as a Parameter to an Invoke Method in WCF RIA Services

蹲街弑〆低调 提交于 2019-12-09 03:11:01
问题 Howdy, ya'll! First question on StackOverflow! :-) So here's the scenario: We're working on a web app with Silverlight 4 and using WCF RIA Services 1.0 SP1 Beta for the web service. I have my entities in the Entity Framework Designer, but I'm using a slightly-modified ADO.NET C# POCO Entity Generator template to generate the classes. What I'd like to do is have a method inside a Domain Service with the following signature: [EnableClientAccess] public class ResultService : DomainService {

how can I add a JSONP endpoing for WCF Ria Services to enable cross-domain calls?

匆匆过客 提交于 2019-12-09 00:52:30
I'm aware that WCF RIA Services has a Microsoft.ServiceModel.DomainServices.Hosting.JsonEndpointFactory that I can use to enable JSON. I need to enable cross-domain calls via JSONP. Is there an existing DomainServiceEndpointFactory that will accomplish this? I just needed to do this - I overrode JsonEndpointFactory and tinkered with the binding in there, then added an endpoint using the new class. namespace Bodge { public class JsonPEndpointFactory : JsonEndpointFactory { public override IEnumerable<ServiceEndpoint> CreateEndpoints(DomainServiceDescription description, DomainServiceHost

Getting Exception

为君一笑 提交于 2019-12-08 13:16:55
问题 I'm getting the following exception when calling 'GetProjectItemSummariesQuery' against my RIA Service. The weird thing is that it only happens once every four or five times I call the function. System.ServiceModel.DomainServices.Client.DomainOperationException: Load operation failed for query 'GetProjectItemSummaries'. Object reference not set to an instance of an object. at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error) at System.ServiceModel

Missing “Add Domain Service Class” in Visual Studio 2012 on Windows 10

浪子不回头ぞ 提交于 2019-12-08 07:44:53
问题 I have a Silverlight 5 app that I need to do maintenance work on. I'd like to avoid a VM. With the release of .Net Framework 4.6.2 (in preview right now) this bug has been fixed, so it should be possible on my Win 10 machine. I have VS2012 installed along with the WCF RIA Services V1.0 SP1 (and Toolkit) plus the Silverlight 5 SDK. The project builds and runs in VS2012... But within VS2012 I'm missing the "Add New Domain Service Class" wizard, which I need for some comparative troubleshooting.

how can I add a JSONP endpoing for WCF Ria Services to enable cross-domain calls?

好久不见. 提交于 2019-12-08 05:57:42
问题 I'm aware that WCF RIA Services has a Microsoft.ServiceModel.DomainServices.Hosting.JsonEndpointFactory that I can use to enable JSON. I need to enable cross-domain calls via JSONP. Is there an existing DomainServiceEndpointFactory that will accomplish this? 回答1: I just needed to do this - I overrode JsonEndpointFactory and tinkered with the binding in there, then added an endpoint using the new class. namespace Bodge { public class JsonPEndpointFactory : JsonEndpointFactory { public override

How do I increase the amount of data I can pass back from a RIA Service?

回眸只為那壹抹淺笑 提交于 2019-12-08 04:34:30
I'm new to WCF, RIA Services, and even Silverlight for the most part. I need to know how to increase the amount of data that I can pass back from a RIA service. I know that I need to create summary lists and I am being smart about how I request data. I can't use paging because I've archetected myself into a corner, and it would be way too much refactoring at this point. I just need to double the limit of data coming back. My requests are fairly small. How can I do this, and also why is this window so small? I'm told that I just have to modify ServiceReferences.ClientConfig but I have no idea

can't pass collection class as parameter to RIA Services

浪子不回头ぞ 提交于 2019-12-08 04:16:12
问题 I'm having a problem passing an list of application-defined objects to RIA services. I get a compile error saying "Error Parameter 'filters' of domain operation entry 'GetPagedExams' must be one of the predefined serializable types." Here's the query in the DomainService: [Query] public IQueryable<ExamEntity> GetPagedExams(int first, int pageSize, List<FilterOptions> filters, List<string> sortDescriptions) { return Context.Exams.GetPagedExams(first, pageSize, filters, sortDescriptions).Data

WCF DataService with Entity Framework: TimeSpan support

ぃ、小莉子 提交于 2019-12-07 12:27:13
问题 I am trying to create a WCF Data Service over an Entity Framework Object context that exposes a number of System.TimeSpan properties. However, when I try to access the service, I get the following error: 'The property 'ScheduledDepartureTime' on type 'DepotRoute' is of type 'Time' which is not a supported primitive type.' I have tried using DataServiceConfiguration.RegisterKnownType(typeof(TimeSpan)) as well as DataServiceConfiguration.EnableTypeAccess(typeof(TimeSpan).FullName) but neither