-
-
Save gavilanch/34e6e220ed3fa9af25548861bbe8eac1 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 Insert(Value value) | |
{ | |
using (SqlConnection sql = new SqlConnection(_connectionString)) | |
{ | |
using (SqlCommand cmd = new SqlCommand("InsertValue", sql)) | |
{ | |
cmd.CommandType = System.Data.CommandType.StoredProcedure; | |
cmd.Parameters.Add(new SqlParameter("@value1", value.Value1)); | |
cmd.Parameters.Add(new SqlParameter("@value2", value.Value2)); | |
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