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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:34:37+00:00 2026-06-01T19:34:37+00:00

I am using the EF in VS2010. I first created a DB and then

  • 0

I am using the EF in VS2010. I first created a DB and then choose create model from DB.. Then I go and choose Add Code Generation item.. everything looks good so far. Now I added a new table in my DB, I then choose update model from DB. This is still OK. How do I tell VS 2010 to generate a model file for that new table?

I end up deleting everything and and repeating the step over and over for every time I make a change to the database. ANy suggestions?

  • 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-01T19:34:38+00:00Added an answer on June 1, 2026 at 7:34 pm

    When you click on Add Code Generation item inside *.edmx it will create two files:

    YourModel.Context.tt (produces a strongly typed ObjectContext for the YourModel.edmx)

    YourModel.tt (responsible for generating a file for each EntityType and ComplexType in the YourModel.Context.tt)

    When you update your *.edmx you just need to right click on YourModel.tt and choose Run Custom Tool.

    More info:

    Because you’re using such approach i would recommend that you move the YourModel.tt file into the separate Class Library project (hold the Shift key and drag and move it)

    Modify:

    string inputFile = @ “YourModel.edmx”; to

    string inputFile = @ “..\YourNamespaceWhereEdmxIS\YourModel.edmx”;

    in your YourModel.tt.

    Change Custom Tool Namespace for your YourModel.Context.tt in the properties browser to match YourClassLibraryName

    Regards.

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

Sidebar

Related Questions

I'm using database first approach to create a model with entity framework. In VS2010
Im using EF4 in VS2010, POCO's and the model-first approach. My entity has the
Using VideoCapture vcc(someDir/someFile.avi); as the first line in my code (OpenCV 2.x, Win7, VS2010),
I'm using VS2010 Ultimate. Having code: //file IntSet.h #include stdafx.h #pragma once /*Class representing
I'm using VS2010 (C#) for a WinForm database program. I've created a dataset, myds,
I am using VS2010 to create a new unit test project to test my
Im trying to create my first WCF restful service. In VS2010 I open weddingservice.svc
I'm running VS2010 SP1. We want to create a project using SQL Server Compact
I'm using VS2010 and created a simple asp. web forms application, using Development Server
I am using VS2010 Beta 2 to create an IIS hosted WCF service. I

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.