riaservices

Silverlight 3 Business application : How to pass query string from Mainpage to About Page?

Main page consists of a listbox, frame and few hyperlinks. On clicking hyperlink, appropriate page is loaded in the frame. How can I pass the selected item value of the listbox on Main page to page being loaded(ex: About page) through query string in silverlight 3? Any pointers will be highly appreciated. ...

NHibernate.Linq, WCF RIA Services, weird error.

Hi all. I have a Silverlight Business Application project set up, with these codes. I have this domain class: public class BaseDomain { public virtual Guid Id { get; set; } public virtual DateTime CreatedOn { get; set; } } public class Sector : BaseDomain { public virtual string Code { get; set; } public virtual string...

Silverlight 4 RIA Services DDS to ViewModel-AutoComplete Selected Item Binding

I have an AutoCompleteBox that uses RIA DomainDataSource for the query to the server. I need to bind the AutoComplete.SelectedItem to the ViewModel.SelectedEmployee. They share the same DomainContext and data, but have different queries. When I try the following: ViewModel.SelectedEmployee = autoCompleteBox1.ItemsSource; I get the err...

ria entity remove bug

hello, I am trying out the ria services and I am experiencing this problem that seems very strange to me. I am creating a new entity of type "House" and add it to context without saving the context so the id of the new entity is 0, after i remove this entity and add another new entity of type "House" again and again without saving the co...

RIA Services for transmitting non DB object-graph

I have been getting into RIA services because I thought it would simplify dealing with the services layer of web applications I wish to build. I see lots of examples out there showing how to create DomainService classes which expose and consume entities that have some kind of relational database backing, and therefore have foreign-key re...

Add validation popup to custom combobox field on Silverlight Dataform

I m using a Dataform that is binded to a entity on my view model, for one field i need to create a combobox of items , i create it and bind it ok using this code on the autogenerating event: ComboBox makes = new ComboBox(); Binding selectedItem = new Binding("conc_claimtype") { Val...

Editing Data in Child Window with RIA Services and Silverlight 4

Is it possible to edit data in a SilverLight Child window when using RIA Services and Silverlight 4? It sounds like a simple enough question, but I have not been able to get any combination of scenarios to work. Simply put, I am viewing data in a grid that was populated through a DomainDataSource. Instead of editing the data on the ...

RIA Services and multiple/dynamic "Include" strategies

As an example, assume the following simple model: public class Order { public List<LineItem> LineItems { get; set; } public List<Fee> Fees { get; set; } } public class LineItem { } public class Fee { } With RIA Services, if I want to retrieve an Order and include all of it's line items in the same network call, I can statical...

remove data layer and put into it's own domain

I have a SL4 application that uses EF4 & RIA Services. DB is SQL 2008. All is working well. Now I want to put the Database and web services on one domain (A.com) with the web service exposing the same methods available in my working project. (one listed at top of message) Then put a Silverlight application (same one as above) on domai...

ComboBox Binding inside Dataform Silverlight

Hi, well I have my users table and my department table, so I have in XAML a Datagrid and a Dataform, in my dataform i have a combobox that is filled from the department table (all possible departments), I bind it to the Department attribute from my user, and it shows it. The problem is that when I click the edit button of the dataform th...

Getting "An entity with the same identity already exists in this EntitySet" but the EntitySet is empty

When I try to add a new item to my EntitySet, I'm getting this exception: An entity with the same identity already exists in this EntitySet However, when I inspect the EntitySet its count is 0. Any ideas why I would be getting this error when the set is empty? How could an entity already exist in the set if the set has no items ...

How much business logic belongs in RIA services layer?

I have been experimenting recently with Silverlight, RIA Services, and Entity Framework using .NET 4.0. I'm trying to figure out if that stack makes sense for use in any of my upcoming projects. It certainly seems like these technologies can be very productive for developing applications, but I'm struggling to decide how an application...

Collection is empty when it arrives on the client

One of my entities has an EntitySet<> property with [Composition], [Include] and [Association] attributes. I populate this collection in my domain service but when I check its contents when it is received on the client, the collection is empty. I am using Silverlight 4 RTM as well as RIA Services 1.0 RTM. Any ideas what I am doing wron...

DomainContext sometimes still HasChanges after SubmitChanges completes

I have a very simple server model that includes a parent entity with a [Composition] list of child entities. In my client, I have 2 functions. One function removes all the child entities from the parent and the other removes all and also edits a property on the parent entity. When I simply remove all child entities and SubmitChanges(), ...

Resolve Concurrency Errors on Silverlight Client with WCF RIA Services

I have a Silverlight 4 project using WCF RIA Services RTM. Most of the RIA functionality is working, but I'm having a problem with concurrency checking. The server is correctly checking concurrency and passing a DomainOperationException to the DomainDataSource.SubmittedChanges event. I'm handling that even and enumerating the Entities...

Why doesn't my viewmodel properties get populated

Hi. I've looked all over and I can't figure out why my viewmodel doesn't get populated. I have this code: _followersRepo = new NotesDomainContext(); _followersRepo.Load(_followersRepo.GetFollowersQuery(), lo => { _followers = new ObservableCollection(_followersRepo.aspnet_Users); }, null); _followingRepo = new NotesDomainConte...

Custom RIA Authentication

Following the steps in this post: http://forums.silverlight.net/forums/t/177042.aspx Where/How do I add the [Key] attribute on the Name property of the IAuthentication where User is one of my ADO.Net Entity objects? My options so far seem to be: In the designer codebehind of me ADO.Net Entity Model. Create a partial User class and ad...

Silverlight Ria Services - Update records server side (domain context) when record is queried

Hello. I am trying to implement functionality on my client side Domain Context where I want to work with each of the database records before they are sent to the client. To create a simple illustration lets assume I wanted to change a field on my customer table called LastAccessed and set it with the current DateTime. Here is what I t...

Sending custom DTO via ria services

Hi I have class to sen via ria service. class look like [DataContract] public partial class AttributeNode { [DataMember] [Key] public int Uid { get; set; } public AttributeNode() { this.Children = new List<String>(); } private String text; [DataMember] public String Text { g...

Serializing Entities with RIA Services

I've got a Silverlight application that requires quite a bit of data to operate and it requires it all up-front. It's using RIA Services (and the Entity Framework) to get all that information. It takes 10-15 seconds to get all the data, but the data only changes about once a month. What I'd like to do is toss that data into Isolated Sto...