December 2019
Intermediate to advanced
598 pages
12h 21m
English
The N+1 problem is a classic query problem where there is a parent-child data model relationship that results in separate database queries for each child record, as well as the query for the parent record.
We are going to add the ability to return answers as well as questions in a GET request to the questions REST API endpoint. We are going to fall into the N+1 trap with our first implementation. Let's open our backend project in Visual Studio and carry out the following steps:
public class QuestionGetManyResponse{ public int QuestionId { get; set; } public string Title { get; set; } public string Content { get; set; } public string UserName { get; set; ...Read now
Unlock full access