December 2019
Intermediate to advanced
598 pages
12h 21m
English
Moving on, let's implement a method for deleting a question now:
public void DeleteQuestion(int questionId){ using (var connection = new SqlConnection(_connectionString)) { connection.Open(); connection.Execute( @"EXEC dbo.Question_Delete @QuestionId = @QuestionId", new { QuestionId = questionId } ); }}
We again use the Dapper Execute method because nothing is returned from the stored procedure.
Read now
Unlock full access