I don’t understand why every discussion of this topic seems to imply the fact that writing SQL is difficult, but writing linq queries is not. Although it’s true that simple linq is, well, simple, as soon as you want to write a query that accesses many tables with complex outer joins, it just becomes incredibly dirty. Not only that, but I have no idea how the main engine will display my request, and if it does not work, it is very difficult to debug it.
I find it 100 times easier to quickly write the complex part of SQL (if I grew up with this, but certainly not the only one) than doing the same thing in linq.
If I need to configure it and save it in a stored procedure, then I just pick it up and release a new saved proc. I do not need to do a complete assembly of the application, because the code is embedded in it.
If it does not work well, I can work with the request until it does.
However, every linq presentation says you no longer need to learn SQL. Yet SQL is such a well-understood, mature language. Hell, I would prefer that I could put SQL directly in my C # code instead of learning the new syntax.
Even the theory of access to the cross-domain database “if I write it in linq, I can use any database I want,” is not interesting to me, especially if I write, say, SQL Azure, where I know exactly which database will be.
So, my attendant (who’s been swelling for some time !!) on this issue. I would go to storage procs. If you want it safe, then load the results into well-defined business objects or linq into sql objects, if you prefer.