public ExecuteNonQueryStatement ( string selectStatement ) : void | ||
selectStatement | string | |
return | void |
public void ExecuteNonQueryStatement(string selectStatement)
{
using (var connection = new SqlConnection(_connectionString))
{
var nonQueryCommand = new SqlCommand(selectStatement, connection);
nonQueryCommand.CommandType = CommandType.Text;
connection.Open();
nonQueryCommand.ExecuteNonQuery();
}
}