DB Result Set and Model Result Sets Different | Rows Duplicating
Hey Everyone
Just wondering if I can get some help with something. I created an application where people can sign up for a competition. Basically the user can enter their team details, such as Team Name and the Players the are involved.
The application has the ability to view the list of players that have sign up for the competition, where it displays the Team Name and players that are involved.
When I do an SQL Query on the database, the results are fine and shows the correct information. However when I do the same from the app, the rows are for some reason duplicated.
I've attached the images from the db and the application.
DB Result set from: SELECT * FROM [dbo].[CompetitionBookingParticipant_View] WHERE CompetitionId='4b0f9684-1ac6-484a-9fe2-c02ecd098ac2';
View that I receive when asking for the same information.
Query: List<CompetitionBookingParticipant_View> participantsList = await _context.CompetitionBookingParticipant_View.Where(booking => booking.CompetitionId == competition.Id).OrderBy(booking => booking.Division).ThenBy(booking => booking.TeamName).ThenBy(booking => booking.Name).ToListAsync();