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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:32:41+00:00 2026-06-05T20:32:41+00:00

I upgraded my EntityModel to version 4.3 using NuGet . Now i want to

  • 0

I upgraded my EntityModel to version 4.3 using NuGet.

Now i want to change my EntityObject.State, but it cant find the .Entry() method.

The current state is Deleted.

This is what i want to do:

someObjectContext.Entry(someEntityObject).State = EntityState.Unchanged;

The referances to EntityFramework and EntityFramework.Extended are added.

So, what am i missing?

EDIT

My NuGet output:

PM> Install-Package EntityFramework -Version 4.3.1
'EntityFramework 4.3.1' already installed.
Data already has a reference to 'EntityFramework 4.3.1'.
  • 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-06-05T20:32:42+00:00Added an answer on June 5, 2026 at 8:32 pm

    You’re using ObjectContext, which does not have the Entry method. You’d have to use DbContext, which is a wrapper around ObjectContext with additional methods, added in EF 4.3 4.1(correction thanks to Slauma) as far as I remember – also there’s a way to extract the ObjectContext from DbContext when needed:

    ObjectContext context = ((IObjectContextAdapter)yourDbContext).ObjectContext;
    

    Here’s the other way around:

    DbContext context = new DbContext(yourObjectContext, true); //or false, depends what you want
    

    Here’s a link to the constructor.

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

Sidebar

Related Questions

I upgraded my XCode to 4.2. But now I can't find upgrade current target
Upgraded server Framework to 4.0. Using Godaddy hosting. The website is now showing this
I upgraded from JQuery 1.3 to 1.4.1, but now I get an exception: System.IO.FileNotFoundException
Upgraded Webbit to 0.4.6 to use the new SSL support but immediately realized that
I upgraded a MVC1 project to MVC2, now all my calls to RenderPartial are
I Upgraded PHP 5.2.8 to php 5.3.10, but php_memcache.dll(Memcache 2.2.6 VC9 x64 Thread Safe)
Upgraded 10.6 from 10.5 and now postgres 8.1 is whacked. To make things worse
I upgraded to xCode 4.2 and it's new Storyboards feature. However, could not find
We upgraded to VS 2010, but we haven't yet upgraded to .NET 4.0. All
I upgraded Python from version 2.6.6 to version 3.2, however, my WING IDE still

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.