Skip to content

Instantly share code, notes, and snippets.

@JoseGonzalez321
Created August 27, 2017 16:47
Show Gist options
  • Save JoseGonzalez321/25cdec8b641d7733495fa62620d75f0c to your computer and use it in GitHub Desktop.
Save JoseGonzalez321/25cdec8b641d7733495fa62620d75f0c to your computer and use it in GitHub Desktop.
public void GetData(int customerId, string businessCode)
{
var query =
$@"SELECT c.*
FROM Customer c
INNER JOIN Business b ON c.BussinessCode = b.BussinessCode AND c.CustomerId = b.CustomerId
WHERE c.customerId = {customerId}
AND b.businessCode = '{businessCode}'";
//Do all the grunt work
ExecuteQuery(query);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment