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 7505471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:55:22+00:00 2026-05-29T21:55:22+00:00

OK. I have turned off AutoDetectChangesEnabled, and when I query the context, modify an

  • 0

OK. I have turned off AutoDetectChangesEnabled, and when I query the context, modify an entity and attempt to save changes, nothing gets updated. I would expect that.

But when I mark the entity as modified, I would expect it to change.

Any ideas?

I am using the UnitOfWork, Repository, Service pattern.

If I enable AutoDetectChangesEnabled then all is fine.

What is the standard way to persist changes to attached objects?

What about detached objects?

Thanks in advance,
Sam

  • 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-29T21:55:29+00:00Added an answer on May 29, 2026 at 9:55 pm

    It’s not just entities what is tracked, but relations as well.

    ObjectContext.ObjectStateManager
          .ChangeRelationshipState(resolution, resolution.Message, r => r.Message, EntityState.Added);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have turned computer monitor off using this command SendMessage(f.Handle, WM_SYSCOMMAND, (IntPtr)SC_MONITORPOWER, (IntPtr)(turnOff ?
I use Cocoa Emacs 23.1.91 and I want to always have hl-line-mode turned off
I'm using ant scp task in a loop and i have turned off failonerror.
I have turned off compatibility mode for IE9 but dojo.isIE is still showing 8
I'm using jQuery Mobile and have turned off the default AJAX handling of forms
I have turned off all of the intelligent typing preferences that I can find
setup Using Dreamweaver CS 5.5 / Windows 7 I have turned off 'Preview [in
I have turned headers off in the report server config file and am attempting
I have turned off the application.calculation = xlcalculationmanual and after such a lengthy vba
i have turned off index.php in my codeigniter by .htaccess and also i left

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.