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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:02:15+00:00 2026-06-01T01:02:15+00:00

I´ve not had much contact with Entity Framework yet and therefore I´d like to

  • 0

I´ve not had much contact with Entity Framework yet and therefore I´d like to hear some guys with experience.

I´ve got an MVC project and my DataAccess lies in a different project where I want to place my EDMX file.

So how would I like to name this file? Per default it is “Model1.edmx” but in the context of MVC I don´t feel comfortable with this name. Is it really a Model?
I tend to call it “DbModel” or something to indicate that it is database related stuff.

And how do you guys call the entity class? I think I like the EF typical name “DbContext”.

So within my controllers I´d have something like

public class WorldController : Controller
{
    DbContext db = new DbContext();

    public ActionResult Own()
    {
        var allContinents = db.Continents;
        [...]
    }
}

Sorry for being fussy but I really do care about naming.

  • 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-01T01:02:17+00:00Added an answer on June 1, 2026 at 1:02 am

    It is good to care about naming!

    How to do it depends on the composition your application. Let’s say you have a web application for registering UFO sightings, to name something common. If there is a separate part of your db (maybe a separate schema) containing users, roles and permissions, you could create a context named AuthorizationContext, and for the business part a context named UfoDbContext.

    I mean, if there are clear aggregates with no or little overlap you could create separate contexts for them with clear names. If one context fits the bill, I would still give it some meaningful name (not DbContext) that relates to your application domain.

    There are people (I’m not one of them) that like to work with one context per application “column” (db to UI) or “user story”. Meaningful names are even more important then.

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

Sidebar

Related Questions

I have not had much experience with VBA, but I sometimes use it at
I have not had much experience with Webservices or API's. We have a website
I'm trying to define a new type and have not had much luck finding
I've been working at this for two days and have not had much luck.
I've got a really odd issue that I've not had any success googling for.
I have not had much time to read through all the documentation for the
I have not had much luck hunting for finding a good explanation of what
I know this isn't a unique issue but I've not had much luck finding
Up to now in my programming career (two years) I have not had much
I've been doing server-side development for several years, and have not had much (read

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.