Skip to content

Instantly share code, notes, and snippets.

View trailmax's full-sized avatar

Max Vasilyev trailmax

View GitHub Profile
@trailmax
trailmax / SqlHelper.cs
Created September 19, 2019 11:50 — forked from i-e-b/SqlHelper.cs
A wrapper around System.Data.SqlClient to make it less weird.
using System;
namespace System.Data.SqlClient {
public class SqlHelper {
readonly string connectionString;
public SqlHelper(string connectionString) { this.connectionString = connectionString; }
public string StringCommand (string commandString, Action<SqlParameterCollection> bindingCommand) {
using (var connection = new SqlConnection(connectionString)) {