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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:20:19+00:00 2026-05-18T12:20:19+00:00

I am delving into the EntityFramework 4 code first of entities approach and I

  • 0

I am delving into the EntityFramework 4 code first of entities approach and I am getting stuck on how to take the ObjectContext / Entities and link them to a database.

I have looked at varous sites on [msdn][1] and [blogs][2] about how to use all of this but they all fail in talking about how to create a database that the entities will be saved in or don’t take the code first apprach. I know I can create an edmx file and generate sql from that but since I am writing my entities first this file is empty and through the designer I don’t see a way of adding my entities without duplicating effort (in creating all the entities/fields etc).

There does not seem to be the EntityConfiguration class in the full release of entity framework. It appears to be only in the CTP that I am NOT using (a lot of the examples on the web use the CTP).

Also the following context takes strings that in no way seem to relate to the edmx or database.

public class EntityContext : ObjectContext
{
    public EntityContext()
        : base("name=ExampleEntities", "ExampleEntities")
    {
        ContextOptions.LazyLoadingEnabled = true;

        Users = CreateObjectSet<User>();
    }

    public IObjectSet<User> Users { get; set; }
}

So the question is.

  1. How do I create a database schema that maps to my entities?
  2. Should I use an edmx file at all or create my own database file (.mdf)?
  3. If I do use the edmx file how do I add my code first entities easily?
  4. How do the ObjectSets within the ObjectContext map to the database?

Thanks

EDIT
I am using VS2010 professional and the classes that come with that. I see CTP4 is out so I assume the RTM version is not out yet. Is this correct?

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

    Looks like I needed CTP4 found here

    I also followed the walkthrough

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

Sidebar

Related Questions

Before delving into the issue, first I will explain the situation. I have two
After delving into the world of opensource I have found implementation is emphasised over
I have just started delving into the world of functional programming. A lot of
I'm delving into some AJAX and I'm trying to utilise jQuery. I have an
I have lately been delving into F# and the new DSL stuff as in
Im getting fairly confused as the book im reading is delving into the NSNumber
I am interested in delving into Erlang's C source code and try to understand
Before delving into my question, I should first provide a synopsis of what angle
I've done some delving into AppleScript but I'm interested in how difficult and long
I am just delving into using jQuery and I want to start off by

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.