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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:21:30+00:00 2026-06-13T07:21:30+00:00

I need to have my .edmx file in my Data project and its generated

  • 0

I need to have my .edmx file in my Data project and its generated models in my Data.Model project.
Is it possible? And if so, how?

  • 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-13T07:21:32+00:00Added an answer on June 13, 2026 at 7:21 am

    Are you using the EF DbContext Generator to generate code-first models? If so, you can build your .edmx file the same way you always do. Once it is created and the models are generated, move the MyContext.tt template into your Data.Models project (Leave your MyContext.Context.tt file in the project with your .edmx).

    After that, open up the Context.tt and near the top change the inputFile to the relative path of your Data.Model project. It will end up something like:

    string inputFile = @”../MyProject.Data.Model/MyDataModel.edmx”;

    Go back to your MyContext.Context.tt in your .Data project and change the CustomToolNamespace property to Data.Model

    From then on, when you make changes to your .edmx file, you will have to also go into your Data.Model project and save the MyContext.tt again to regenerate the models.

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

Sidebar

Related Questions

I have several entities generated from my Entity Framework data model. In the .edmx
If you are using object contex data model (with EDMX file), during its creation
Is it possible to create Entity Data Model (edmx file) from MS Access Database
I have an ADO.NET Data Service that exposes an Entity Framework data model (.edmx).
We have several SQL scripts which are generated from an Entity Model. They need
I need to have a list of links generated by JSF and displayed in
I have an edmx file and I changed a table in my database. I
I have used Entity Framework and have generated edmx for my db. The generated
I have the need to regenerate my Entity Model using code. I don't wan't
I have an edmx file that reflects 100% my DB schema. Along with this

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.