Problem refreshing tables in the LINQ to SQL designer

后端 未结 9 1399
野趣味
野趣味 2021-02-08 12:54

I have been using LINQ to SQL for a while, and there is one thing that has always bothered me. Whenever I modify the schema of a table, in order to refresh it in the designer, I

9条回答
  •  甜味超标
    2021-02-08 13:25

    I have a similar comment, thought it might fit in here for anybody out there Googling a solution to this issue...

    When I change the columns that are returned by a stored procedure, deleting the procedure from the designer and re-adding it does not work. The custom return type entity that the designer generates does not reflect the changes to the SP.

    I've tried disconnecting the DB in the server explorer, even deleting and re-adding the connection.

    The only solution I've found is this: 1. Delete the SP from the designer. 2. Save the dbml file (or the whole solution, whatever) 3. Completely close Visual Studio. 4. Re-open Visual Studio and your solution. 5. Re-add the stored procedure to the designer.

    I think that qualifies as a blue ribbon pain in the rump. Anybody got a simpler solution?

    PS- To those of you with 100+ tables: Go get a real (real == mature) ORM tool. I personally vote for NetTiers. It rocks. Used it for years with no (or at least very few) complaints. You'll probably have to buy CodeSmith to use it effectively, but it's worth it. The templates are open source. And there are templates for nHibernate as well. But I've found that I don't really dig on Java ports. If I'm gonna code on MS platforms I want code that was "born" there...

    ...editorial complete. :P

提交回复
热议问题