Skip to content

Instantly share code, notes, and snippets.

@maximgorbatyuk
Created January 17, 2022 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maximgorbatyuk/09908ae8a3c7a7c34277f5e723d6ce47 to your computer and use it in GitHub Desktop.
Save maximgorbatyuk/09908ae8a3c7a7c34277f5e723d6ce47 to your computer and use it in GitHub Desktop.
var viewRows = _context.Set<TView>().ToQueryString();
var connection = _context.Database.GetDbConnection() as SqlConnection;

#pragma warning disable CA2100
var da = new SqlDataAdapter(viewRows, connection);
da.Fill(dataTable);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment