Skip to content

Instantly share code, notes, and snippets.

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