C# class which makes SQL Server query operations more streamlined
Usage:
class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
public int Age { get; set; }
public decimal HeightInCentimeters { get; set; }
}List<Person> People = new List<Person>();
// Provide your connection string to the SqlQueryTool constructor
SqlQueryTool sqlQueryTool = new SqlQueryTool(connectionString);
// The YourDatabase..Person table has the same schema and field names as the Person class
var dictResult = sqlQueryTool.Select("SELECT FirstName, LastName, Age, HeightInCentimeters FROM YourDatabase..Person");
dictResult.ForEach(x => People.Add(sqlQueryTool.GetObjectFromDictionary<Person>(x)));