-
-
Save milleniumbug/3ba346ed5c803ecdb828843e3d143c78 to your computer and use it in GitHub Desktop.
This file contains 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
public IEnumerable<IDictionary<String, Object>> GetAllItems(SqlCommand command, string connectionString) | |
{ | |
using (var connection = new SqlConnection(connectionString)) | |
{ | |
command.Connection = connection; | |
foreach(var item in command.ExecuteAndGetAllItems()) | |
yield return item; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment