-
-
Save gavilanch/3046489d94ee5ce6b301c99b69448214 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
return; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment