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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:03:00+00:00 2026-06-12T20:03:00+00:00

I used EF (Model First) today for the first time since installing VS2012RC. I

  • 0

I used EF (Model First) today for the first time since installing VS2012RC. I was surprised to see that the generated code inherited from ObjectContext (EF 4.x style) rather than DbContext (EF 5.x). To make sure that I hadn’t missed something obvious I found and followed the following tutorial – MSDN Model First Sample

with the same result. At ~4:10 in the video it clearly shows that BloggingContext inherits DbContext. My generated code:

/// <summary>
/// No Metadata Documentation available.
/// </summary>
public partial class BloggingContext : ObjectContext
{

My .edmx file is in the root project folder and no template files (*.tt) get added automatically as the video shows they should. If I manually ‘Add Code Generation Item’ (DbContext Fluent…) the code does get generated properly.

Is this a known problem with the RC version of VS or any other ideas?

  • 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-12T20:03:02+00:00Added an answer on June 12, 2026 at 8:03 pm

    I belive the transition to DbContext happened post RC. The tutorials/walkthrough for EF5 are (at least should be) using VS 2012 RTM and this is the reason why you see DbContext. Since VS 2012 RTM shipped in August you should no longer be using the RC version but RTM.

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

Sidebar

Related Questions

This code worked fine when I used model first aproach. And stoped saving a
I'm trying to use code first model for my simple blog site, I'm used
I know that Code-First uses conventions for model binding, and that this is the
I have created my first Yii application. I used Gii Model generator for creating
I am using django 1.3.1 and satchmo 0.9.2. I used the default model that
It used to be that within a CodeIgniter model you couldn't access another model.
Why is MODEL in ASP.NET MVC sometimes used as part of an application that
I am developing an EF - MVC 3 application. I have used model first
Can SimpleMembership be used with EF model-first ? When I try it, I get
I have one property on my view model that is used in a select

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.