ria-services

Use RequiresRole in RIA Services for DataForm commands

So I have a DataForm in my WCF RIA Services application. I want all authenticated users to be able to cycle through the data. I want people of role Edit to be able to Edit and Add entries and people with role Delete to be able to delete entries. I'm unsure how to accomplish this. The best I can think of is in the initialization to c...

linq to sql domain context not visible to domain service class

Hello, I'm creating a silverlight 4 application (using the Business Application template). I generated Linq to SQL classes for my tables in the .web project and want to use RIA services. When I add the domain service class to the .web project the data context for the Linq to SQL classes isn't available to choose. According to the doc...

Submit operation failed - NotFound from RIA Services with Silverlight 4 on SubmitChanges()

I'm using SL4 and RIA Services to build a new solution based on the Silverlight Business Application template. Since I'm still developing, I'm just using localhost. I'm trying to test the SubmitChanges functionality by making a single change in an associated (composition) entity and calling SubmitChanges. I have a breakpoint in my Dom...

RejectChanges() problem with RIA Services and Silverlight 4

I'm using SL4 and the version of RIA Services that was released at the same time as SL4 (mid-April 2010). I have a datagrid that is bound to a PagedCollectionView that wraps the EntitySet returned by RIA Services, i.e. context.MyEntities. I don't allow editing directly in the grid. Instead, I have a separate "update" panel (a UserCo...

How do I get notifications from an asynchronous RIA Services call?

I've got an application set up with RIA Services, Entity Framework 4, and Silverlight 4. It is set up in the fashion prescribed on MSDN here: Walkthrough: Creating a RIA Services Solution On the client side, this code loads the customer entities into a grid's ItemsSource: public MainPage() { InitializeComponent(); ...

silverlight The type exists in both and DataContractSurrogates

Hi I'm using silverlight 4 with ria serivces .. I got an error said : The type 'eLab.Web.SessionsHWFile' exists in both 'eLab.Web.dll' and 'DataContractSurrogates_c96b3601-cd13-4049-93bb-e7b3f59a4fd9' where eLab.Web is the aspx web project that hosts the silverlight project, and SessionsHWFile is an edmx entity ,it's not a real tab...

Adding authentication to a Silverlight 4 RIA services application (not the business template)

I started a Silverlight 4 RIA Services application with the Navigation Application template, instead of the Business Application template. Now I want to add authentication to that application (to protect a page from unauthenticated users) I've added an AuthenticationService to the project, but I'm not sure what the steps are now to get...

Why is IEntityCollection internal / How to find EntityCollection<T>.Count ?

In RIA services the EntityCollection<T> class is defined as follows : public sealed class EntityCollection<TEntity> : IEntityCollection, IEnumerable<TEntity>, IEnumerable, INotifyCollection...

Pros / Cons to Different Binding Approaches using MVVM and RIA Services

I have been building an application, which uses the LoadOperation's Entities to return an IEnumerable which becomes the source of a CollectionViewSource in my View Model. I am now discovering the potential pitfall to this approach, when adding Entities in my Silverlight client, I cannot see these entities, unless I either submit the New...

Ria services reference is missing from silverlight 4 on VS2010

I'm walking through a tutorial for Ria services and Silverlight 3 however my coding environment is VS2010 (with .Net 4.0 and SL4). The tutorial references system.web.ria and I can't find that reference at all in the Add References window for VS2010. ...

MVVM-light + RIA Services best practices

I would like to start a collection of MVVM-light (w/ RIA Services) Best Practices. There are a number of items I have found to be helpful best practices or best approaches, but would like to hear from others using the MVVM-light toolkit and see what they have found as well. Please post your best practices as answers to this question....

How do I have a method or property on the model in the server also get generated in the client?

I've got an application set up with RIA Services, Entity Framework 4, and Silverlight 4. It is set up in the standard fashion prescribed on MSDN here: Walkthrough: Creating a RIA Services Solution I've written a new method (or property) against one of the entity objects which resides on the server; I would like this method (or property...

Does ria services have something like sqlclient SqlCommand for executing T-SQL?

How would ria services do this kind of thing? using (SqlConnection connection = new SqlConnection(connectionString)) { string TSQL="update products set price=price*1.03 where category='computer books'"; SqlCommand command = new SqlCommand(TSQL, connection); command.Connection.Open(); command.ExecuteNonQuery(); } Thank...

Continuous Integration with RIA Servies

Hi, I've got some issues with a project I'm trying to set up in TeamCity. This project consists of 3 class libraries (one of which is a silverlight RIA library), a Web Application and a silverlight project. The issue I have is that, as we're using RIA services, my usual approach to silverlight builds (i.e. building the silverlight app...

How do I disable validation in a Silverlight 4 application?

update How do I disable validation in a Silverlight 4 application? It looks like this is something not unique to RIA Services (as my original question below implies). I observe this when I bind my datagrid to a list of POCOs and I trigger a validation error in my grid (e.g. typing in a non-numeric in a cell bound to a numeric property)...

Example for using WCF RIA Services with Prism?

Is there a current and good example how to use WCF RIA Services together with Prism? There's a lot of information about each topic. But at the moment I can't see how to put everything together into a "real world" LOB application. ...

How to use NHibernate and DTOs with RIA Services

I’m using NHibernate with RIA Services and Silverlight 4. I create DTOs for transferring the data via RIA Services rather than distributing my domain layer objects (as per Martin Fowler’s First Law of Distributed Object Design: “Don’t distribute your objects!”). The DTO objects are flattened down to two layers from five corresponding ...

RIA paging with custom data layer

We're using a custom data access layer to read our domain objects (customers, orders, etc) from a database. This data access layer does not support paging or sorting. We want to publish parts of the data (for instance customers) to a Silverlight client, using WCF RIA Services. In the client, we want to display a data grid with paging. ...

RIA Services OData "Query options are not allowed."

Hi, I have a OData endpoint which was created automatically by RIA which seems to work with simple 'get' queries. E.g. http://xxx/Service/BusinessApplication1-Web-DomainService1.svc/odata/ProductSet But when I try to use queries such as 'where' or 'top', e.g: .../BusinessApplication1-Web-DomainService1.svc/odata/ProductSet?$top=50...

How is RIA services for relational data efficiency?

I have been researching RIA services with silverlight 4 and considering using it. Switching to silverlight from ASP gives me some concerns about the maturity of silverlight for data driven apps. I was looking at relational data queries. Lets say I have a 'person' table and a 'cars' table. Multiple cars can be associated with a person. N...