none
Force edmx update/re-generation with code RRS feed

  • Question

  • I have Automated Test suite. I want implement there EF6. My problem is:

    I have some test environments. Mostly i use only 1, so on my local version i can afford my self to update them manually, but it hardly is a good option when project is built on TeamCity. I want to make sure that everyone can run full build with TC for every environment, without manually regenerating .edmx`s and pushing them back to master branch. 

    Lets say, each environment has 3 DB, so what i would like to do right now is to create 3 .edmx and then when project is build is launched i will force .edmx`s to update according to current environment, before any test started to run.

    The other option is to store 3 .edmx for each environment (obviously it is the least favorable variant), but still i need to know how can i tell my .edmx that they need to be updated.

    Wednesday, May 9, 2018 8:47 AM

All replies

  • IMO,  the only one that is actually going to work in the last one you talk about that is talking about an EDMX and related code base that matches  for each environment that is being done from a manual aspect. 

    And that I know about, there is nothing that is going notify an EDMX that it needs updating, just like you can't do it with source code knowing  that it has to notify another related environment source code in the code repository that it needs to update its code base.    

    Wednesday, May 9, 2018 9:21 AM
  • And if, lets say i have 2 DB with exactly same scheme, can i use 1 .edmx for both of them? I am passing connection string as parameter to the construction.
    Wednesday, May 9, 2018 1:28 PM
  • And if, lets say i have 2 DB with exactly same scheme, can i use 1 .edmx for both of them? I am passing connection string as parameter to the construction.

    Yes, as long as the edmx (the virtual model) doesn't change between the two code bases (are not different), then one edmx can be used between the two code bases.
    Wednesday, May 9, 2018 3:34 PM