When I make a database change, how do I know what needs to be removed and readded to the LinqToSql O/R Designer in Visual Studio?

后端 未结 2 753
隐瞒了意图╮
隐瞒了意图╮ 2021-01-14 10:46

For example, I alter a column in a table to be not null from null.

I need to then delete and readd the table. That part is pretty clear.

What about views, f

相关标签:
2条回答
  • 2021-01-14 11:13

    It seems you are putting a lot of business logic into your SQL DB rather than keeping it in the app itself. Try adopting a more DDD approach with a Domain Model - this should move much of the work those SPs and Views from the db are doing back into the application where they belong. Then your db should only be for persisting data and hence changed to tables should only require a very small amount of time in the L2S designer to make updates.

    0 讨论(0)
  • 2021-01-14 11:14

    +1 on the question.

    But what's bad about using a commercial tool if it solves the problem? After all, if you spend an hour per week on manually matching up changes instead of hitting a button that does it all for you, then the license cost of using a commercial tool will pay itself back in no time at all. All tools that address this issue cost a fraction of a Visual Studio license, have free trials, and the price is not more than an hour of work for most devs. Just my 2 cents.

    That said, I agree it would be neat if this functionality was available for free. I have tried suggesting that to MSFT many times but they don't seem to be interested in that. (as in: they don't even reply back... :) )

    0 讨论(0)
提交回复
热议问题