public static object ExecuteScalarCommand(this IObjectSpace objectSpace, string commandText)
 {
     using var command   = objectSpace.CreateCommand();
     command.CommandText = commandText;
     return(command.ExecuteScalar());
 }
 public static int ExecuteNonQueryCommand(this IObjectSpace objectSpace, string commandText)
 {
     using var command   = objectSpace.CreateCommand();
     command.CommandText = commandText;
     return(command.ExecuteNonQuery());
 }
Exemplo n.º 3
0
 public static IDataReader ExecuteReaderCommand(this IObjectSpace objectSpace, string commandText)
 {
     using var command   = objectSpace.CreateCommand();
     command.CommandText = commandText;
     return(command.ExecuteReader());
 }