ria-services

Does RIA Services requires an extra install on the server?

If I want to deploy an ASP.NET application that hosts RIA Services endpoints for a Silverlight application, do I have to install anything extra on the web server? Or is it just some extra DLLs that can be deployed to my applications Bin folder? I know that when you are doing RIA Services development there are additional toolkits and wh...

Deserialization on client side in Domain Service

I have 2 classes: Person and Contact. Person class has a property named ContactNumber which returns the Contact type, and this property is marked as a DataMember for serialization. I have marked Contact type as a DataContract. On the client side I am able to get the values, but when I try to insert a value and then do submit, I get the...

How should a unit test be written to verify a WCF-RIA Services DomainService query method requires authentication?

I'm doing unit testing for our WCF RIA services, which have RequiresRole or RequiresAuthentication attributes attached to them. I've been able to test the Update, Insert, and Delete methods to ensure the attributes are properly set. This is done by mocking a IServiceProvider, creating a DomainServiceContext with that provider and the cor...

RIA Services - Two entity models share an entity name

I have two entity models hooked up to two different databases. However, the two databases both have a table named 'brand', for example. As such, there is a naming conflict in my models. Now, I've been able to add a namespace to each model, via Custom Tool Namespace in the model's properties, but the generated code in my Silverlight proje...

How do I use DomainContext.Load to populate properties of my ViewModel?

I have a Silverlight page that gets its data from a view model class which aggregates some data from various (RIA services) domain services. Ideally I'd like the page to be able to data bind its controls to properties of the view model object, but because DomainContext.Load executes a query asynchronously, the data is not available when...

Usage of WCF RIA Services, where the datasource isn't a classical (relational) database

I want (have) to write a Silverlight and (or) ASP.NET based webapplication with SAP in the backend (in other words, the datasource is no classical database) . The usage of Silverlight and ASP.NET is a precondition. Is it possible to use the WCF RIA Services (and Silverlight) where the data-source are RFCs from SAP ? Makes this sense ? If...

Are there scenarios where the usage of WCF RIA Serivces isn't a good choice ?

Since Silverlight 4 Microsoft recommends the usage WCF RIA services for business applications. Are there Silverlight scenarios, where the WCF RIA serives should no be used and plain WCF services or webservices or other techniques are the better choice ? ...

RIA services/DataForm: How to use ReadOnly & Description attributes together

I have several cases where I have a property that I want to declare readonly, but also give some explanation of how it is calculated/set using the [Display(Description="")] attribute. I would like to do this in the metadata, if possible, rather than override in the dataform itself. Here's an example: [Display(Description = "Total n...

Silverlight and RIA Service without ASP.NET

Hi, I'm pretty new to Silverlight/RIA/Asp.Net thing, and I'm trying to figure if an Asp.Net website is required (for hosting the app) if I wish to use RIA services with Silverlight? ...

CUD Methods won't fire

I'm trying to use RIA Services with Repository pattern, Every CRUD operations worked perfectly until I implemented the repositories. Now only query and Submit methods are working. I tried the methods both with and without Query, Insert, Update and Delete attributes. Does anybody know what the problem is? [LinqToEntitiesDomainServiceDes...

Why use a "RIA Services Link" instead of just an OData endpoint?

Before reading, please know I've read all the other posts about the differences between vanilla WCF, WCF Data Services and RIA Services. My question is specifically about why RIA Services is being considered as a special kind of data source specifically for Silverlight when it seems to make more sense to just have it do one job: serve as...

Silverlight 4 RIA Services, the SIlverlight 4 Toolkit controls and many to many relationships in database

I was looking at snippets and tutorials for quite some time now, but I can't find a complete answer - just some bits and pieces. I have a database with 3 tables: Product: id uniqueidentifier name nvarchar(50) Category: id uniqueidentifier name nvarchar(50) ProductCategory: fk_product uniqueidentifier fk_category uniqueiden...

LINQ to XML and RIA Services?

What is the difference between the two? Are they supposed to perform one and the same function - data binding? Or are they "apples and oranges" in comparison? ...

Silverlight 4, RIA Services Multi-step Server Side Validation

Newbie question, I have a simple Silverlight 4 client. I'm creating some methods on the server side to handle new user creation / validation. Before I create the user, I'd like to validate a number of things. Does the user name already exist? Is the email address valid? Does the password pass strictness checking? Etc, etc. I'm not ...

Ria Services: Synchronous DomainDataSource.SubmitChanges()

Hey guys I'm trying to upload images (byte arrays) from the client to a database - this works like a charm. The thing is, I'd like to show the progress of this operation to the user, but the DomainDataSource object doesn't provide any sort of progress-event. If I call SubmitChanges for each entity it somehow starts to overlap and thin...

TwoWay binding in SL4 stops working when I add RIA Services to the mix. Solution?

Environment: VS2010, SL4, RIA Services I have an SL4 UI that I developed against data objects that were instantiated from an XML file (so that I didn't have to worry about the back end of the app while I worked on the front end). In this UI, I have a data grid that shows properties for each object in the collection of data. I also ha...

Creating ObjectContext for AuthenticationService without username and password

I have used the Silverlight BusinessApplication template in VS2010. I have changed the AuthenticationService to use my own Authentication methods - the requirement is that the user logs into the system with their SQL login (no AD in the company). On login, I construct a SQLConnection, attempt to open it, then I get their details (fri...

How to get can CanAddNew to be true for a collection returned by RIA Services

RIA Services is returning a list of Entities that won't allow me to add new items. Here are what I believe to be the pertinent details: I'm using the released versions of Silverlight 4 and RIA Services 1.0 from mid-April of 2010. I have a DomainService with a query method that returns List<ParentObject>. ParentObject includes a pro...

Cannot cast anonymous return type from query to an entity type

I'm struggling with a (usually simple to deal with) problem. I have a database containing a "measurements" table. Each measurement has a timestamp (datetime), a value (decimal), a measurement type (foreign key to a lookup table) and belongs to a "capacity item" (a master table). I imported the SQL database in Entity Framework and creat...

Ria service generated code not support partial class

I'm using Ria service class library. This contains 2 library named RiaClasslibrary RiaClasslibrary.Web. Riaclasslibrary.Web contains ADO.NET entity data model and named BaseModel. BaseModelcontains tPage class. My problem is I'm inserting separated tPage class. This class contains 2 public property. show below public sealed partial...