December 2019
Intermediate to advanced
598 pages
12h 21m
English
Let's implement the GetUnansweredQuestions method, which is very similar to the GetQuestions method:
public IEnumerable<QuestionGetManyResponse> GetUnansweredQuestions(){ using (var connection = new SqlConnection(_connectionString)) { connection.Open(); return connection.Query<QuestionGetManyResponse>( "EXEC dbo.Question_GetUnanswered" ); }}
So, we open the connection, execute the Question_GetUnanswered stored procedure, and return the results in the QuestionGetManyResponse class we have already created.
Read now
Unlock full access