public async Task <object> ExecuteScalarAsync(ISqlCommandDefinition command) { using (SqlCommand sqlCommand = command.GetCommand()) { sqlCommand.Connection = Connection; return(await sqlCommand.ExecuteScalarAsync()); } }
public object ExecuteScalar(ISqlCommandDefinition command) { using (SqlCommand sqlCommand = command.GetCommand()) { sqlCommand.Connection = Connection; return(sqlCommand.ExecuteScalar()); } }
public int ExecuteNonQuery(ISqlCommandDefinition command) { using (SqlCommand sqlCommand = command.GetCommand()) { sqlCommand.Connection = Connection; return(sqlCommand.ExecuteNonQuery()); } }
public async Task <int> ExecuteNonQueryAsync(ISqlCommandDefinition command) { using (SqlCommand sqlCommand = command.GetCommand()) { sqlCommand.Connection = Connection; OpenConnection(); return(await sqlCommand.ExecuteNonQueryAsync()); } }