none
How to refresh the Model When a Table or SPORC is changed RRS feed

  • Question

  • Hi,

    Excuse if this is a stupid question but I could not find a way to update the model when a Stored procedure or a Table is changed.

    Entity Framework has an "Update Model from Database" in the popup menu but I could not find it in Linq to SQL.

    I am new to LinQ to Sql and I intend to change the name of the attributes and tabled, develop helper methods an validation checks in the generated classes. I wonder if I will loose everything if I have to change the physical table and remap it ????

    Thanks in advance
    • Edited by mbaffa Wednesday, July 8, 2009 7:15 PM
    Wednesday, July 8, 2009 6:44 PM

Answers

  • The L2S designer don't support that out-of-the box. The MSFT recommended way is to recreate your model whenever something changes.

    That said, I have an add-in for Visual Studio that adds L2S<->db model sync (both directions) and a couple of other good-to-have features to the L2S designer. You can download it and get a free 45-day trial license from http://www.huagati.com/dbmltools/ .
    Kristofer - Huagati Systems Co., Ltd. - Cool tools for Linq-to-SQL and Entity Framework: www.huagati.com/dbmltools (VS designer add-in), www.huagati.com/L2SProfiler (query profiler for L2S)
    • Marked as answer by mbaffa Thursday, July 9, 2009 1:11 AM
    Thursday, July 9, 2009 1:04 AM
    Answerer

All replies

  • The L2S designer don't support that out-of-the box. The MSFT recommended way is to recreate your model whenever something changes.

    That said, I have an add-in for Visual Studio that adds L2S<->db model sync (both directions) and a couple of other good-to-have features to the L2S designer. You can download it and get a free 45-day trial license from http://www.huagati.com/dbmltools/ .
    Kristofer - Huagati Systems Co., Ltd. - Cool tools for Linq-to-SQL and Entity Framework: www.huagati.com/dbmltools (VS designer add-in), www.huagati.com/L2SProfiler (query profiler for L2S)
    • Marked as answer by mbaffa Thursday, July 9, 2009 1:11 AM
    Thursday, July 9, 2009 1:04 AM
    Answerer
  • Thanks

    I will try it out
    Thursday, July 9, 2009 1:11 AM