wcf-ria-services

Any advantages from using WCF Data Services in ASP.NET web applications?

If I am creating web applications using ASP.NET and Silverlight is nowhere in the future and there's no need to expose data to third party services (eg, no oData needed), are there any advantages of using WCF Data Services over the traditional ADO.NET methods we've been using over the years? ...

How to retrieve single record in WCF RIA Services?

I'm using WCF RIA Services and I have a domain service method that returns a single entity. In my Silverlight client project I'm now using following code to retrieve that entity: ctxt.Load(ctxt.GetEmployeeByNumberQuery("ABC123")).Completed += new System.EventHandler(EmployeeLoad_Completed); void EmployeeLoad_Completed(object sende...

How does one monitor the progress of a RIA WCF submit call ?

Hi, I have a RIA SubmitChanges call off my domain context: _context.SubmitChanges((results) => ...do something for errors on return Is there anyway to monitor the progress of SubmitChanges while it is transferring the entity set over RIA ? I use a BackgroundWorker thread to do my processing (not the RIA calls, as they seem to spawn ...

Any example on binding Silverlight Combobox with both text and image from database

I am working with Northwind and using WCF RIA (with EF 4.0) to pull data on to Silverlight client. All I am trying to accomplish is to have ComboBox showing list of Categories with both CategoryName and Picture from database. I am using ValueConverter to convert bytes to bitmapimage, but getting Catastrophic error. Anyone has any Comb...

How closely is Entity Framework tied to WCF RIA Services?

I'm trying to build a simple proof-of-concept "business application" in Silverlight and I keep running into a wall in trying to get data in and out of the database. I'm currently trying to learn WCF RIA Services, but I'm stuck because I can't get Entity Framework to work with existing tables in my database (they don't show up in the mod...

VB.NET version of Silverlight Business Application template won't compile

I just installed the latest Silverlight 4 developer bits using the Web Platform Installer. I tried to start a new "Silverlight Business Application" project in VB.NET, but the project won't compile out of the box. For example, I get an error message to replace WebContext with WebClient. What might be the problem with the Silverlight B...

Insert / Update with RIA services Compositional Attribute

I am creating a Silverlight 4 application with Entity Framework, RIA Services and MVVM-Light toolkit. The application deals with a complex object graph, that contains the following structure: Job 1->* Resources Job 1->* Workplans Workplan 1->* WorkplanItems Resource 1->* Assignment WorkplanItems 1->* Assignment I would like to...

Using Silverlight RIA Services DomainDataSource to query by user

So I am using the SL4 Business Template and the SQL Membership API. I created a user and I created a custom table that ties to that user. So I want to have a datagrid that show the item for the CURRENT (WebContext.Current.User) user. Why is the GUID for the user in WebContext.Current.User??? I need that to join to the 'Items' table. H...

WCF RIA +SL4 - how to validate a collection?

Hello! I'm using WCF RIA + Silverlight 4.0 in my project. On client and server side I need to check (via validation process) if collection (e.g. Orders) that belongs to e.g. Manager is filled or not. The rule is that at least one Order should be there otherwise validation failed. Orders are loaded together with Manager via [Include] a...

SL4 Binding problem with WCF RIA Services

Basic problem: How do I bind a textbox to the selected item of a combobox who's itemsource is the result of a LINQ query on a WCF RIA Services Domain context. Additional requirement: When the selected item is changed the binding should update. Additional requirement: The binding should be two way. My solution so far: After the user c...

WCF RIA Services, SL4

After I edit an entity and save it, how do I reload the datasource to refresh the entities? I have a listbox with entities, and after I edit the entities the datasource is still showing the old information. the MyEntityDataSource.Load() method is not working. The problem arises because I am not navigating to a separate page to do the ed...

Silverlight Asyncronous Column Binding

I have two distinct databases as a source for a Silverlight RIA application. They are exposed through separate RIA services. There is one relationship between the databases, meaning that I have a foreign key (no constraint) between the databases. My Entities currently load this as an Int32. How would I go about mapping this to an act...

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. ...

SL4 WCF RIA Query Issue: "Completed" happening before it's really completed?

I have a strange little issue with a WCF RIA service I'm using in a SL4 application. Here is the code for a button click handler I've got: private void btnTest_Click(object sender, RoutedEventArgs e) { LanguageContext context = new LanguageContext(); LoadOperation<Language> op = context.Load(context.GetLanguagesQ...

RIA Services + Entity Framework 4 + POCO's : 'The Timestamp field is required' error?

I've the following table definition in MSSQL: CREATE TABLE [User] ( [Id] bigint identity(1,1) NOT NULL, [Email] nvarchar(256), [PasswordHash] nvarchar(128) NOT NULL, [PasswordFormat] int DEFAULT ((0)) NOT NULL, [PasswordSalt] nvarchar(10) NOT NULL, [Timestamp] timestamp ) ; The EDMX property for Timestamp loo...

DomainService only works with EDMX file?

I want to add a new domain service class within vs2010. I choose my entity framework database context in the dialog "Add New Domain Service Class", but it doesen't show me the available entities. If I click "ok" VS2010 gives me the following error message: --------------------------- Microsoft Visual Studio --------------------------- V...

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 ...

WCF RIA over Net.TCP binding?

I am trying to improve the performance of a Silverlight 4 WCF RIA application. As it's for intranet use only, I figured switching from the default binary HTTP binding to the Net.TCP binding might improve performance a bit. However, I am having a hard time just getting a simple proof of concept application running. I have: switched t...

Ria Services Passing Complex Object as parameter to a query domain service method

Hi I'm experiencing some difficulties with a WCF RIA Services similar to the problem specified in this thread. The domainservice method I'm creating (a Query method) should take a complex object parameter. example domainservice method: public ComplexObjectResult GetComplexObject(ComplexObjectParameter test) { //do stuff ...

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...