Skip to content

Instantly share code, notes, and snippets.

Created May 27, 2019
What would you like to do?
public async Task DeleteById(int Id)
using (SqlConnection sql = new SqlConnection(_connectionString))
using (SqlCommand cmd = new SqlCommand("DeleteValue", sql))
cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@Id", Id));
await sql.OpenAsync();
await cmd.ExecuteNonQueryAsync();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment