C# Sql Connection Best Practises 2013
- by Pete Petersen
With the new year approaching I'm drawing up a development plan for 2013. I won't bore you with the details but I started thinking about whether the way I do things is actually the 'correct' way. In particular how I'm interfacing with SQL.
I create predominantly create WPF desktop applications and often some Silverlight Web Applications. All of my programs are very Data-Centric.
When connecting to SQL from WPF I tend to use Stored Procedures stored on the server and fetch them using ADO.NET (e.g. SQLConnection(), .ExecuteQuery()). However with Silverlight I have a WCF service and use LINQ to SQL (and I'm using LINQ much more in WPF).
My question is really is am I doing anything wrong in a sense that it's a little old fashioned?
I've tried to look this up online but could find anything useful after about 2010 and of those half were 'LINQ is dead!' and the other 'Always use LINQ'
Just want to make sure going forward I'm doing the right things the right way, or at least the advised way :).
What principles are you using when connecting to SQL? Is it the same for WPF and Silverlight/WCF?