SqlClient Introduction - nemiro-net/nemiro.data.dll GitHub Wiki

SqlClient is main class for work with SQL Server.

Class has a five simple methods:

  • GetData - get DataSet;
  • GetTable;
  • GetRow;
  • ExecuteScalar;
  • ExecuteNonQuery.

Each of the methods has three overloads:

  • Without parameters, to use the command from an instance of SqlClient;
  • With specifying text T-SQL statement (not recommended);
  • With specifying SqlCommand instance.

For using convenience of the SqlClient class, it is recommended to add a database connection string to the configuration file: