Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6085681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:39:58+00:00 2026-05-23T11:39:58+00:00

In my silverlight project, I am using RIA DomainDataService to get objects from the

  • 0

In my silverlight project, I am using RIA DomainDataService to get objects from the asp.net project.

public class MyObject
{
[Key]
public int Id{get;set;}
public double XValue {get;set;}
}

This is the static object in the RIA Service – its scope is class level.

private static List<MyObject> Models = new List<MyObject>();

In asp.net project, I insert objects in Models and get it on silverlight end. Later on, I have to modify objects in the static List but the List always returns the same objects and not the modified versions of the object.

I modify the object such as:

Models[0].XValue = 0.1;

On the RIA Service, I can see the list being modified. The service method then returns this object but silverlight gets the same old List and not the modified one.

It seems like RIA Service keeps the objects in memory and just returns the same object.

How do I edit my custom class “MyObject”‘s properties values such that Silverlight front end can get the modified list? Do I need to make MyObject editible? Please guide.

Found the solution. Answered below incase if i ever helps anyone 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:39:59+00:00Added an answer on May 23, 2026 at 11:39 am

    RIA service will not modify an object on the client side if an object’s Key property is the same. Even if we modify other properties of an object, it will not be picked up. If we are sending a List from RIA service to client side Silverlight application then we will have to set a new value for the Key property of the object after we modify it so it is refreshed and silverlight can get the updated changes.

    Therefore,

    Create a public Guid UniqueID property in your XYZ class
    
    Add [Key] attribute to it
    
    When creating an object set its
    value to Guid.NewGuid()
    
    When updating an object, set its
    value to Guid.NewValue()
    

    If you want to update all of the Guid values of a list then you can use anonymous method:

    MyList.Select(c => { c.UniqueID = Guid.NewGuid(); return c; }).ToList();
    

    Hope it helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Silverlight project (with ASP.net MVC web project) Suddenly, when I press
I am working on a Silverlight 4 project. I am using WCF RIA on
I have been experimenting recently with Silverlight, RIA Services, and Entity Framework using .NET
I am about to start a new project. Using VS2010, Silverlight 4, and RIA
Using Silverlight 3 and RIA Services I have the following class defined in my
I'm using .NET RIA Services July Preview to communicate between my Silverlight client and
I have recently tried using the Silverlight NUnit Project template (the one from Jamie
I'm working on a Silverlight project with the WCF RIA Services beta. I'm using
I'm using WCF RIA + Silverlight 4.0 in my project. On client and server
I have a Silverlight Project which passes data using the Data Contract to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.