Last active
April 27, 2020 16:00
-
-
Save Anton-Norko/09f771f61df4ee32f8e5277b2eaf9466 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private bool HasFieldRows(string command, SqlConnection connection) | |
{ | |
using(var command = new SqlCommand(command, connection)) | |
using(var reader = command.ExecuteReader()) | |
{ | |
return reader.HasRows; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment