Skip to content

mctelinde/SQLQueryTool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

SqlQueryTool

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)));

About

C# class which makes SQL Server query operations more streamlined

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages