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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:45:15+00:00 2026-05-20T20:45:15+00:00

After migrated EF4 CTP5 to RC1, I notice the ObjectContext is no longer accessible

  • 0

After migrated EF4 CTP5 to RC1, I notice the ObjectContext is no longer accessible through DbContext. It means I can’t access ChangeObjectState method.

class DataContext : DbContext
{
    public DataContext()
    {
    }

    public DataContext(DbCompiledModel dbModel)
        : base(dbModel)
    {
    }

    public DbSet<MyClass> MyClasses { get; set; }

    public void ChangeObjectState<T>(T entity, EntityState entityState)
    {
        // this is no longer working.. where is ObjectContext? 
        ObjectContext.ChangeObjectState(entity, entityState);
    }
}

Has anyone have any idea how access that method in RC1?

Thanks.

  • 1 1 Answer
  • 3 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-20T20:45:16+00:00Added an answer on May 20, 2026 at 8:45 pm

    You don’t need to access ObjectContext to change object state. Use this:

    this.Entry<T>(entity).State = entityState;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After i migrated my WCF5.0 application to integrate with azure i can not use
At work, we have migrated from Windows XP to Windows Vista. After the migration,
We had an application using axis2 1.0. We recently migrated to axis2 1.4. After
After a system upgrade i am no longer able to start my tomcat5 server.
After we migrated to Clearcase UCM , we have created stream for each sub
Recently I've migrated to Arch Linux, after ~4 years being loyal to Ubuntu. Everything
OK, after migrated to Gecko 2.0 for my XPCOM Component, I fixed a couple
We have lots of stored procedures written in SQL Server 2005. After database migrated
My application is throwing this error after I have migrated from GWTP 0.6 to
I had my site running fine on the devp. server. After I migrated the

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.