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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:03:11+00:00 2026-06-10T06:03:11+00:00

I have the need to regenerate my Entity Model using code. I don’t wan’t

  • 0

I have the need to regenerate my Entity Model using code. I don’t wan’t to go and right click and update model from database every time there is a change.

So i started looking at EdmGen and EdmGen2

I use EdmGen2 to pregenerate my Model Views for me:

using (System.Diagnostics.Process process = new System.Diagnostics.Process())
{
    process.StartInfo.FileName = @"C:\EdmGen2.exe";
    process.StartInfo.Arguments = @"/ViewGen cs ""C:\Project\EntityFramework\Model\ApplicationEntityModel.edmx""";
    process.StartInfo.WorkingDirectory = @"C:\Project\EntityFramework\Model";
    process.Start();
    process.WaitForExit();
}

This works perfectly.

No i am trying to regenerate my Entity Model:

using (System.Diagnostics.Process process = new System.Diagnostics.Process())
{
    process.StartInfo.FileName = @"C:\EdmGen2.exe";
    process.StartInfo.Arguments = String.Format(@"/ModelGen ""{0}"" ""System.Data.SqlClient"" ""ApplicationEntityModel""", ConnectionString);
    process.StartInfo.WorkingDirectory = @"C:\Project\EntityFramework\Model";
    process.Start();
    process.WaitForExit();
}

This only generates the .edmx file. Can’t specify namespaces so this is not working for me.

Is there any tool or template that i can use to completely regenerate my Entity Model', this includes the.edmxanddesigner.cs`?

  • 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-10T06:03:13+00:00Added an answer on June 10, 2026 at 6:03 am

    I got the source code for the EntityStoreSchemaGenerator and was able to code it up.

    You can add these filters and such to limit which tables you want. There is also this crazy pluralizer thing to figure out when to add/remove an “S” from the end of your entity collections. It was failing for the case of a word that ended in Status, it though the singular was Statu (I always laughed at that), but i was able to tell it that the plural of Status is Statuses (even if that is not officially correct) and that the singular of Statuses is Status.

    The code is here:
    http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/30b10ed3-b705-458d-ae1f-19d595bceb39/

    I found the code to a class that would merge all the files into an edmx.
    http://fusioncrm.googlecode.com/svn-history/r5/trunk/Fusion.Data.Generation/ModelGenerator.cs

    I wrote a consoleapp that runs all this for a client based on a “gold” database, I also hated running this from the designer because it always was slightly different for some reason. This way seems to always generate the same file and as such is clearer what changed when doing check-ins to version control.

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

Sidebar

Related Questions

I have a need to remove an element from my screen and then regenerate
I have need to return multiple results from a subquery and have been unable
I have an Entity result of List<string> GetTagsData that I need to somehow bind
I have a long document in XML from which I need to produce static
I have a Microsoft Access 2010 database(*). Now, using Visual Studio 2010, I want
I have four DB tables in an Oracle database that need to be rewritten/refreshed
I have a code that is meant to run a check on my database
I have need to produce LINE, BAR, and PIE charts in Rails. I have
I have need to pack four signed bytes into 32-bit integral type. this is
I have need for a function pointer that takes two arguments and returns a

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.