LINQ using SP: How do you do after updating an SP interface? RRS feed

  • Question

  • Hello!

        I wonder how do you others do after updating a SP's interface (i.e. change input parameter, change selection or change type of any of the previous) in order to make the dbml file notice the change?

    What we do is delete the SP from the dbml file, press the refresh button in the Server Explorer and drag and drop the SP from the Server Explorer to the dbml file again.

    This however doesn't always work. Sometimes no affected is taking place before we close the Visual Studio totally, reopen the .sln file and do the above again.

    Is there any better way to "refresh" an SP that already exists in the dbml or is deleting it and adding again the only way?

    If delete -> refresh -> drag & drop doesn't help, is there anything else to do besides closing the Visual Studio totally and reopening the .sln again?

    Thanks in advance,

    Thursday, March 5, 2009 9:54 AM


  • There is a command line tool that comes with .NET 3.5 called sqlmetal.exe.

    If you add a prebuild event to your project everytime you build it will automatically re-add all the tables and stored procedures to your dbml file!!! No more dragging and dropping =).

    If you don't want a prebuild event you can use this free tool called SQL Metal Builder:
    It is a GUI interface to the dbml generator very user friendly.

    • Marked as answer by Keren S Wednesday, March 11, 2009 1:12 PM
    Friday, March 6, 2009 1:05 AM