3 ms·
There's a lot of power and flexibility using a Model with LINQ. The strongly typed nature has saved me many times. When you alter a table and remove or rename a
by vyrotek 16y ago
There's a lot of power and flexibility using a Model with LINQ. The strongly typed nature has saved me many times. When you alter a table and remove or rename a column you know exactly which queries are now broken at build time. If you were generating or hardcoding sql there's a chance that you hosed a lot of things and need to dig through all the code.
Dynamically creating queries is amazing in LINQ. Building them with strongly typed expressions is much better than messy string concatenation.
- jasonkester 16y agoAgain, that's not unique to LINQ. Drop a db column in the thing we use and the project will fail to compile until you fix up the references. And of course, if you're keeping your stored procedures in source control and recompiling them at build time (which of course you should), you'll know when you break them too. As you say, strongly typed dataobjects are pretty cool. Regardless of how they interface with the database.