开发者

Setting the UpdateCheck.Never mode by default in Visual Studio 2010 DBML designer (MS SQL/ASP.NET MVC)

In my web application I do a lot of updates. And therefore the only acceptable UpdateCheck mode for all columns except for the primary key one is "NEVER".

But unfortunately the DBML designer automatically sets the "ALWAYS" mode. So I have to go through dozens of columns to change it manually, and when I have to update the DBML file... It goes back to "ALWAYS" again.

So is t开发者_开发知识库here a way to automatically set the mode you want?


I found the solution!

You can select several columns in the designer with the Shift key. And then do one mouse click.

I love Visual Studio :)


There IS a solution to make this default.

Just add a column with both name and type set to Timestamp to the desired table and then drop it to the DBML designer!

Visual Studio (at least VS 2010) will automatically set all other columns' Update Check to Never except the Timestamp column.

Credits to Simon_Weaver's answer here: How much overhead does 'Update Check' have for LINQ UPDATES

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜