C# snippet below helps to read SQL data to List<T> generic collection without any extensions or frameworks only with SQL and LINQ.
C# snippet below helps to read SQL data to List<T> generic collection without any extensions or frameworks only with SQL and LINQ.
Writing connection string manually is one of the worst things in software development. That's why I always want them to be generated by any tool but not by me. Some times before I have found a way how to generate a connection string creating an .udl file in Windows (https://markimarta.com/c/how-easily-write-the-text-of-connection-string/). Now I've found a better way.
It’s a little example, or may be template, of correct code for work with MSSQL server using OleDbConnection. There are two parts you should remember about - connection string and OleDB commands. The most difficult part of this is the connection string. It took me a lot of my time until I studied how to write this string easily. (read more...)