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

  • Home
  • SEARCH
  • 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 5844269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:16:07+00:00 2026-05-22T12:16:07+00:00

I often find myself needing to edit an entity on the client side in

  • 0

I often find myself needing to edit an entity on the client side in RIAServices for mere UI purposes with absolutely no intention of saving the changes back to the database. However, if I don’t enable editing of that entity in my domain service, RIAServices throws and error as soon as I try to change a field on one of my entities, saying that editing has not been enabled on that entity.

But the problem is I DON’T want to allow actual editing of the entity in the database, I simply want to mess around with it on the client. I have yet to find a decent way to solve my problem, and it seems like the only option is to either go ahead and enable actual editing, and just never call SubmitChanges() (which is a very scary idea), or do a foreach loop when I load in the entities and create a new instance of each entity and copy all of its properties over (basically clone my loaded entities so that I’m not using the ones RIAServices loaded), but this is hardly practical.

What I’m looking for (if it exists) is to, after I load them, somehow “detach” my list of entities on the client side, so that RIAServices stops monitoring them and I can edit them at will (I’ll lose the ability to save them back, but that’s ok since I don’t need or want to anyway). Any ideas? This has been driving me nuts.

  • 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-22T12:16:08+00:00Added an answer on May 22, 2026 at 12:16 pm

    You can easily detach the whole list of entities from the DomainContext by calling

    DomainContext.MyEntities.Clear();
    

    Before you do this, just copy the entities into another list so that you can access them later. (I suggest keeping them in the ViewModel.)

    In short, just do this:

    1. Load the entities via RIA Services.
    2. Copy the loaded entities into a List<MyEntity> in your ViewModel.
    3. Call DomainContext.MyEntities.Clear();
    4. Modify your entities as much as you like; they will not be sent back to the server on SubmitChanges(), because they are no longer kept in the DomainContext.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I often find myself needing reference to an object that is several objects away,
I often find myself wanting to debug CSS layout issues that involve DOM changes
I often find myself needing a quick ( in terms of code ), lightweight
I often find myself needing to write functions to load/save from/to ASCII (or similar)
I find myself often needing to use Integer.TryParse to test if a value is
Often, I find myself needing to make a tree of directories executable for someone,
I often find myself needing a tool that would allow me to: search for
I find myself often needing addClassName and removeClassName functions for Element s. However, I
I often find myself using Integers to represent values in different spaces. For example...
I often find myself confused with how the terms 'arguments' and 'parameters' are used.

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.