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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:03:05+00:00 2026-05-13T23:03:05+00:00

I’m trying to find some information on preferred solution setup when using MVC 2

  • 0

I’m trying to find some information on preferred solution setup when using MVC 2 and Entity Framework, and it would seem most intuitive to me to set this web app up in 3 layers:

  • MyProject.Web (MVC project for presentation)
  • MyProject.Data (Data gateway layer using Entity Framework to speak to the DB)
  • MyProject.Tests (Test project as created when setting up a new MVC project)

This seems to be contrary to the examples I’m finding, and the documentation (eg, the NerdDinner example) which see the MVC project as mediating directly with the database. The NerdDinner example puts the data access in a repository class mixed in with the MVC models.

I’ve tried going with the way which seems best to me, and have created my “ADO.NET Entity Data Model” item in my separate Data project, but this gives me an error when I try to use MVC to list the items in it:

“Unable to load the specified metadata resource.”

unless I have a copy of the Entity Data model in my MVC project as well.

Before I go too far down the road of looking into this error, I want to find out if I’m just fighting against the framework for purism when I could just be disciplined with only using data access in my repository.

so:
– Is it even possible or recommended to put my Entity Framework def in this other project?
– Will I be sacrificing certain other MVC features by separating it out in this way? (eg, validation?)
– If I’m heading in the right direction and others agree, are there any other examples or docs out there someone could point me at?

  • 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-13T23:03:06+00:00Added an answer on May 13, 2026 at 11:03 pm

    Yes, I think it’s a good idea to put your entities in a separate assembly.

    One way to fix the “Unable to load the specified metadata resource” error is to specify the assembly in the connection string explicitly:

    <connectionStrings>
        <add name="MyEntities" connectionString="metadata=res://*/AssemblyName.bin.Namespace.MyEntities.csdl|res://*/AssemblyName.bin.Namespace.MyEntities.ssdl|res://*/AssemblyName.bin.Namespace.MyEntities.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=SERVER_NAME;Initial Catalog=DBName;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/>
    </connectionStrings>
    

    Note, especially, the AssemblyName.bin.Namespace.MyEntities. This is the assembly-qualified resource name (assuming the assembly is called “AssemblyName.dll”. You may need to use Reflector to figure it out the first time you do this.

    This answer might also be helpful.

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

Sidebar

Ask A Question

Stats

  • Questions 378k
  • Answers 378k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Press Ctrl+M, P. Alternatively, go to Find Options and check… May 14, 2026 at 9:16 pm
  • Editorial Team
    Editorial Team added an answer It will all depend on what stats package you chose… May 14, 2026 at 9:16 pm
  • Editorial Team
    Editorial Team added an answer I found the problem, it is in Maven.php file from… May 14, 2026 at 9:16 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.