Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Commit 20b730c

Browse files
committed
Fixed a bunch of issues
- App now functions again via Newtonsoft.Json and refactored EF Core queries. - Added missing migrations for BackEnd. - Fixed a bunch of issues with Home and My Agenda page rendering, including #100, and made setting of page title's consistent. - Deleted unused pages.
1 parent 335c9cf commit 20b730c

26 files changed

+648
-108
lines changed

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
https://dotnetfeed.blob.core.windows.net/dotnet-core-preview7-012802/index.json;
88
https://grpc.jfrog.io/grpc/api/nuget/v3/grpc-nuget-dev;
99
</RestoreSources>
10+
<DisableImplicitAspNetCoreAnalyzers>true</DisableImplicitAspNetCoreAnalyzers>
1011
</PropertyGroup>
1112
</Project>

src/BackEnd/Controllers/AttendeesController.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ public async Task<ActionResult<List<SessionResponse>>> GetSessions(string userna
4545
.Include(s => s.SessionSpeakers)
4646
.ThenInclude(ss => ss.Speaker)
4747
.Where(s => s.SessionAttendees.Any(sa => sa.Attendee.UserName == username))
48-
.Select(m => m.MapSessionResponse())
48+
//.Select(m => m.MapSessionResponse())
4949
.ToListAsync();
50-
return sessions;
50+
51+
// BUG: Working around EF Core 3.0 issue: https://github.com/aspnet/EntityFrameworkCore/issues/16318
52+
return sessions.Select(s => s.MapSessionResponse()).ToList();
5153
}
5254

5355
[HttpPost]

src/BackEnd/Controllers/SessionsController.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ public async Task<ActionResult<List<SessionResponse>>> Get()
2727
var sessions = await _db.Sessions.AsNoTracking()
2828
.Include(s => s.Track)
2929
.Include(s => s.SessionSpeakers)
30-
.ThenInclude(ss => ss.Speaker)
31-
.Select(m => m.MapSessionResponse())
30+
.ThenInclude(ss => ss.Speaker)
31+
//.Select(m => m.MapSessionResponse())
3232
.ToListAsync();
33-
return sessions;
33+
34+
// BUG: Working around EF Core 3.0 issue: https://github.com/aspnet/EntityFrameworkCore/issues/16318
35+
return sessions.Select(s => s.MapSessionResponse())
36+
.ToList();
3437
}
3538

3639
[HttpGet("{id}")]

src/BackEnd/Controllers/SpeakersController.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ public async Task<ActionResult<List<SpeakerResponse>>> GetSpeakers()
2525
var speakers = await _db.Speakers.AsNoTracking()
2626
.Include(s => s.SessionSpeakers)
2727
.ThenInclude(ss => ss.Session)
28-
.Select(s => s.MapSpeakerResponse())
28+
//.Select(s => s.MapSpeakerResponse())
2929
.ToListAsync();
3030

31-
return speakers;
31+
// BUG: Working around EF Core 3.0 issue: https://github.com/aspnet/EntityFrameworkCore/issues/16318
32+
return speakers.Select(s => s.MapSpeakerResponse()).ToList();
3233
}
3334

3435
[HttpGet("{id}")]

src/BackEnd/Migrations/20190711192431_Initial.Designer.cs

Lines changed: 180 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)