ria-services

Returning nested complex types from EF4 using Stored Procedures

Is it possible to return nested complex types from multiple different Stored Procedures using EF? (e.g. ClientSelect, ClientAddressSelect) I have imported a few stored procedures and added function imports and created a Complex Type for each of the return types. (e.g. Client and ClientAddress). Now, for example, I want to add the Clien...

Overriding the Constructor in RIA Services Shared Code

I'm trying to override the constructor of a partial class in RIA DomainService shared code as follows. foo.shared.cs: public partial class Foo { private SomeClass _privatevariable; public Foo(SomeClass variable) { this._privatevariable= variable; } } foo is a generated class based on an Entity Framework Model. When I b...

Difference in RIA services between .NET 3.5 and 4?

I am about to start a new project. Using VS2010, Silverlight 4, and RIA Services are a given. However, due to the web server we have available, there is some question of whether we can use .NET 4 or whether we will have to stick to .NET 3.5. I know that RIA Services can work with .NET 3.5. But what I'm curious about is whether there ...

How to programatically detect if a DataForm is in edit mode

I'm using a DataForm in Silverlight 4. Several DataForms, actually, and they share a common RIA Services context. Here's the problem I'm having... If I start editing a DataField in one of the DataForms, then click on a button that calls Context.SubmitChanges(), I get the following error: �Entity 'foo' is currently being edited and ...

How can I reference resx files in a Silverlight RIA Services Library?

Hi All, I'm a Silverlight newbie. When I create a silverlight 4 business application in Visual Studio 2010, the web application has a resource folder with resx files. The silverlight application has a folder web/resources/ then there are two 2 resx files in there named the same as the 2 in the web app. They have little arrow icons on ...

Why do I get this error : "Domain operations cannot be started at design time?"

Hi, I have created a silver light user control and I want to test it in a new View (MyTest.xaml). I can see my user control in the toolbox. But when I drag and drop it to the design area in I get this error: Cannot create an instance of ctlMyControl. Domain operations cannot be started at design time. Basically, it is a control with ...

How to handle differing validation rules in RIA Services?

We have an Entity Framework model that is used by two different silverlight applications. The validation rules are very similar in the two contexts, but differ slightly. For example, a regular user in one of the applications cannot input time that is in the future, but an administrator in the other application can put time that is in...

RIA Services Authentication - What type? Preventing "copies?"

I've got a Silverlight application that will be running out on the open internet, available to basically everyone who has ever lived. The application makes use of RIA Services to manipulate data in a database on the server. The application creates, reads, updates, and deletes data of different varieties, however I only want these oper...

Localizing dates and times automatically in Silverlight

This is more of a question about best pattern and practice than asking about any one particular method. We have app that is heavily reliant on dates and times and is hosted in the US. Sometimes it needs to perform actions based on those values, like emailing out reminders and expiring "single-use" session tokens. However there are clien...

Under what circumstances are RIA services navigation properties loaded?

We have a Silverlight 4 client connecting to RIA services. It's based on the standard "Business Application" Silverlight application in VS 2010. The objects we send to the client over RIA services are EF 4 entities that are POCO objects generated from our edmx by T4. Our RIA service is a LinqToEntitiesDomainService<> of our linq reposito...

Validating XML against XSD using Silverlight?

So I have been twiddling with a personal project to import my garmin gps data into a local database. The data lives in a GPX xml file, whose schema is defined by an xsd file. The idea is for the client to upload their GPX file, and the SL client would validate it before sending it to the server. But I ran into some issues here, first ...

RIA Services, Silverlight 4, Hooking child entity events in the parent entity.

I'm using Silverlight 4 RIA Services. Customer class has CustomerAddresses child collection. In the server-side metadata file I added the following attributes: [Include] [Composition] public EntityCollection<CustomerAddress> CustomerAddresses { get; set; } I'm able to query my customer data without any problem. When customer loaded in...

Composition of composition not working...

Hello, I am currently using RIA services with an object containing a child containing itself a child and it's not working :-( ! I have an update method for the BaseObject and the FirstChild are correctly present in the client but it behaves as if I have no SecondChild object (the type is not event created on the client)... Here are...

Trouble with metadata in Entity Framework connection string

I have a Silverlight 4 app using RIA Services in which I moved all of the RIA Services-specific code to a separate module (a WCF RIA Services class library) called "AppServices". Let's call the main app "Silverlight4App". I need to authenticate the users against a different database than the database where the rest of the data is stored....

RIA method does not appear in Silverlight

I have a DomainService with a few methods. One has a return type of string and no parameter: public string MyMethod1() { } I can call this one from Silverlight. One has a return type of void, and a parameter that is a domain object (I am using LinqToSqlDomainService and this object is part of the DataContext): public void MyMethod2...

Providing update notification from DomainService to DomainContext

I need to inform the DomainContext in the silverlight application about changes that are made on the serverside (aka. Model of the DomainService). Does the DomainService or other classes for RIA Services provide such notification (like Events) or do i have to call a method on the DomainService periodically to check if changes where made...