How to update a EDMX file if any modifications happened in the Database.? RRS feed

  • Question

  • Hi,

    IN EF-4.0 [ADO.NET] When i use " Update Wizard" by right-click on EDMX ..,It making change on edmx when i delete some table in DB.

    But when i make changes to the columns in tables its not reflecting in the EDMX perfectly.  

    So i started doing manually by modifying in EDMX xml file which contain ssdl, csdl etc..,.

    My Question : Is there any way to make these modifications automatically by running a script or piece of code or some thing which save my time, as many DB changes happen in my project.. 

    Wednesday, September 5, 2012 12:30 PM


All replies

  • Hi Shanmukha,

    Welcome to the MSDN forum.

    Could you please let me know what changes you made to columns?

    Did you click the Refresh tab on the Update Wizard?

    Good day.

    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us

    Friday, September 7, 2012 6:25 AM
  • Hi Alexander Sun,

    Thanks for Welcoming to MSDN forum.

    Actually I am working on the Entity Framework - 4.0 , SQL SERVER - 2008 , MVC -3 .

    I made changes to the columns to the table like Column Name changing or like Column deletion etc.., These are not reflecting.

    One more thing is " EDMX is not recognizing the Default Generated fields like '' ,  'GUID'  "

    On clicking the Refresh in Wizard i got ssdl file is updated, but not csdl File.  

    In order to obtain this i am manually updating csdl.



    Friday, September 7, 2012 9:31 AM
  • Hi Shanmukha,

    For example, if you changed the column name, Entity Framework do not know the new colunm is the previous one. As the result, Entity Framework will add a new scalar property to Entity. Then, you can delete the previous property. Yes, actually, it is updated in SSDL. You can take a look at this page:

    You also can submit this problem here:

    You said EDMX is not recognizing the default generated fields. Could you please provide steps to help us reproduce your problem?

    Best Regards,

    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Alexander Sun Wednesday, September 19, 2012 7:02 AM
    Tuesday, September 11, 2012 1:16 PM