Exemplo n.º 1
0
 public async Task <object> ExecuteScalarAsync(ISqlCommandDefinition command)
 {
     using (SqlCommand sqlCommand = command.GetCommand())
     {
         sqlCommand.Connection = Connection;
         return(await sqlCommand.ExecuteScalarAsync());
     }
 }
Exemplo n.º 2
0
 public object ExecuteScalar(ISqlCommandDefinition command)
 {
     using (SqlCommand sqlCommand = command.GetCommand())
     {
         sqlCommand.Connection = Connection;
         return(sqlCommand.ExecuteScalar());
     }
 }
Exemplo n.º 3
0
 public int ExecuteNonQuery(ISqlCommandDefinition command)
 {
     using (SqlCommand sqlCommand = command.GetCommand())
     {
         sqlCommand.Connection = Connection;
         return(sqlCommand.ExecuteNonQuery());
     }
 }
Exemplo n.º 4
0
 public async Task <int> ExecuteNonQueryAsync(ISqlCommandDefinition command)
 {
     using (SqlCommand sqlCommand = command.GetCommand())
     {
         sqlCommand.Connection = Connection;
         OpenConnection();
         return(await sqlCommand.ExecuteNonQueryAsync());
     }
 }