Skip to content

Instantly share code, notes, and snippets.

@DDzia
Created January 21, 2019 11:50
Show Gist options
  • Save DDzia/484a2ec6344eeaa37320aad26d8ab024 to your computer and use it in GitHub Desktop.
Save DDzia/484a2ec6344eeaa37320aad26d8ab024 to your computer and use it in GitHub Desktop.
var conn = new SqlConnection("some connection string");
var db = new DatabaseContext(conn);
const string tableName = "dbo.tUsers";
var dataFound = db.QueryToTable(tableName)
.Where(x => (string)x["UserName"] == "Dzianis")
.ToList();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment