Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. public int ExecuteNonQuery(CommandType commandType, string commandText)
  2. {
  3. PrepareCommand(commandType, commandText);
  4. var noOFRowsAffected = _dbCommand.ExecuteNonQuery();
  5. SetParameters(_dbCommand.Parameters);
  6. return noOFRowsAffected;
  7. }
  8.  
  9. public async Task<int> ExecuteNonQueryAsync(CommandType commandType, string commandText)
  10. {
  11. PrepareCommand(commandType, commandText);
  12.  
  13. return await Task.Factory.StartNew(() =>
  14. {
  15. return _dbCommand.ExecuteNonQuery();
  16. });
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement