This repository was archived by the owner on Jul 10, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 13 files changed +42
-49
lines changed Expand file tree Collapse file tree 13 files changed +42
-49
lines changed Original file line number Diff line number Diff line change 11<Project >
22 <PropertyGroup >
33 <!-- .NET Core daily build feeds -->
4- <RestoreSources >
4+ <!-- < RestoreSources>
55 $(RestoreSources);
66 https://api.nuget.org/v3/index.json;
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;
9- </RestoreSources >
10- <DisableImplicitAspNetCoreAnalyzers >true </DisableImplicitAspNetCoreAnalyzers >
9+ </RestoreSources>-->
10+ <DisableImplicitAspNetCoreAnalyzers >false </DisableImplicitAspNetCoreAnalyzers >
1111 </PropertyGroup >
1212</Project >
Original file line number Diff line number Diff line change 33 <PropertyGroup >
44 <TargetFramework >netcoreapp3.0</TargetFramework >
55 <UserSecretsId >aspnet-BackEnd-931E56BD-86CB-4A96-BD99-2C6A6ABB0829</UserSecretsId >
6+ <IncludeOpenAPIAnalyzers >true</IncludeOpenAPIAnalyzers >
67 </PropertyGroup >
78
89 <ItemGroup >
9- <PackageReference Include =" Microsoft.EntityFrameworkCore.SqlServer" Version =" 3.0.0-preview7.19352.17 " />
10- <PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" Version =" 3.0.0-preview7.19352.17 " />
11- <PackageReference Include =" Microsoft.EntityFrameworkCore.Tools" Version =" 3.0.0-preview7.19352.17 " >
10+ <PackageReference Include =" Microsoft.EntityFrameworkCore.SqlServer" Version =" 3.0.0-preview* " />
11+ <PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" Version =" 3.0.0-preview* " />
12+ <PackageReference Include =" Microsoft.EntityFrameworkCore.Tools" Version =" 3.0.0-preview* " >
1213 <PrivateAssets >all</PrivateAssets >
1314 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
1415 </PackageReference >
15- <PackageReference Include =" Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version =" 3.0.0-preview7.19353.9" />
16- <PackageReference Include =" Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version =" 3.0.0-preview7.19353.9" />
17- <PackageReference Include =" Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version =" 3.0.0-preview7.19353.9" />
16+ <PackageReference Include =" Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version =" 3.0.0-preview*" />
17+ <PackageReference Include =" Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version =" 3.0.0-preview*" />
1818 <PackageReference Include =" Swashbuckle.AspNetCore" Version =" 5.0.0-rc2" />
19- <PackageReference Include =" Microsoft.VisualStudio.Web.CodeGeneration.Design" Version =" 3.0.0-preview6-19319-03 " >
19+ <PackageReference Include =" Microsoft.VisualStudio.Web.CodeGeneration.Design" Version =" 3.0.0-preview* " >
2020 <PrivateAssets >all</PrivateAssets >
2121 </PackageReference >
2222 </ItemGroup >
Original file line number Diff line number Diff line change 11using System . Collections . Generic ;
22using System . Linq ;
33using System . Threading . Tasks ;
4- using BackEnd . Data ;
54using Microsoft . AspNetCore . Mvc ;
65using Microsoft . EntityFrameworkCore ;
76using Microsoft . AspNetCore . Http ;
7+ using BackEnd . Data ;
88using ConferenceDTO ;
99
1010namespace BackEnd . Controllers
@@ -21,6 +21,9 @@ public AttendeesController(ApplicationDbContext db)
2121 }
2222
2323 [ HttpGet ( "{username}" ) ]
24+ [ ProducesResponseType ( StatusCodes . Status200OK ) ]
25+ [ ProducesResponseType ( StatusCodes . Status404NotFound ) ]
26+ [ ProducesDefaultResponseType ]
2427 public async Task < ActionResult < AttendeeResponse > > Get ( string username )
2528 {
2629 var attendee = await _db . Attendees . Include ( a => a . SessionsAttendees )
@@ -45,11 +48,10 @@ public async Task<ActionResult<List<SessionResponse>>> GetSessions(string userna
4548 . Include ( s => s . SessionSpeakers )
4649 . ThenInclude ( ss => ss . Speaker )
4750 . Where ( s => s . SessionAttendees . Any ( sa => sa . Attendee . UserName == username ) )
48- // .Select(m => m.MapSessionResponse())
51+ . Select ( m => m . MapSessionResponse ( ) )
4952 . ToListAsync ( ) ;
5053
51- // BUG: Working around EF Core 3.0 issue: https://github.com/aspnet/EntityFrameworkCore/issues/16318
52- return sessions . Select ( s => s . MapSessionResponse ( ) ) . ToList ( ) ;
54+ return sessions ;
5355 }
5456
5557 [ HttpPost ]
Original file line number Diff line number Diff line change 11using System . Collections . Generic ;
22using System . Linq ;
33using System . Threading . Tasks ;
4- using BackEnd . Data ;
5- using ConferenceDTO ;
64using Microsoft . AspNetCore . Mvc ;
75using Microsoft . EntityFrameworkCore ;
6+ using BackEnd . Data ;
7+ using ConferenceDTO ;
88
99namespace BackEnd . Controllers
1010{
Original file line number Diff line number Diff line change 22using System . ComponentModel . DataAnnotations ;
33using System . Linq ;
44using System . Threading . Tasks ;
5- using BackEnd . Data ;
6- using ConferenceDTO ;
75using Microsoft . AspNetCore . Http ;
86using Microsoft . AspNetCore . Mvc ;
97using Microsoft . EntityFrameworkCore ;
8+ using BackEnd . Data ;
9+ using ConferenceDTO ;
1010
1111namespace BackEnd . Controllers
1212{
@@ -28,12 +28,10 @@ public async Task<ActionResult<List<SessionResponse>>> Get()
2828 . Include ( s => s . Track )
2929 . Include ( s => s . SessionSpeakers )
3030 . ThenInclude ( ss => ss . Speaker )
31- // .Select(m => m.MapSessionResponse())
31+ . Select ( m => m . MapSessionResponse ( ) )
3232 . ToListAsync ( ) ;
3333
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 ( ) ;
34+ return sessions ;
3735 }
3836
3937 [ HttpGet ( "{id}" ) ]
Original file line number Diff line number Diff line change @@ -25,11 +25,10 @@ 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- // BUG: Working around EF Core 3.0 issue: https://github.com/aspnet/EntityFrameworkCore/issues/16318
32- return speakers . Select ( s => s . MapSpeakerResponse ( ) ) . ToList ( ) ;
31+ return speakers ;
3332 }
3433
3534 [ HttpGet ( "{id}" ) ]
Original file line number Diff line number Diff line change 1010using Microsoft . Extensions . Configuration ;
1111using Microsoft . Extensions . DependencyInjection ;
1212using Microsoft . Extensions . Hosting ;
13- using BackEnd . Data ;
1413using Microsoft . OpenApi . Models ;
14+ using BackEnd . Data ;
1515
1616[ assembly: ApiConventionType ( typeof ( DefaultApiConventions ) ) ]
1717
@@ -41,10 +41,7 @@ public void ConfigureServices(IServiceCollection services)
4141 } ) ;
4242
4343 services . AddControllers ( )
44- . SetCompatibilityVersion ( CompatibilityVersion . Version_3_0 )
45- // BUG: There's an issue with the default JSON formatters right now that is causing truncation of results.
46- // Uncomment following line to make app functional.
47- . AddNewtonsoftJson ( ) ;
44+ . SetCompatibilityVersion ( CompatibilityVersion . Version_3_0 ) ;
4845
4946 services . AddHealthChecks ( )
5047 . AddDbContextCheck < ApplicationDbContext > ( ) ;
Original file line number Diff line number Diff line change 66 </PropertyGroup >
77
88 <ItemGroup >
9- <PackageReference Include =" Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version =" 3.0.0-preview7.19353.9 " />
10- <PackageReference Include =" Microsoft.AspNetCore.Identity.UI" Version =" 3.0.0-preview7.19353.9 " />
11- <PackageReference Include =" Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version =" 3.0.0-preview7.19353.9 " />
12- <PackageReference Include =" Microsoft.EntityFrameworkCore.Tools" Version =" 3.0.0-preview7.19352.17 " >
9+ <PackageReference Include =" Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version =" 3.0.0-preview* " />
10+ <PackageReference Include =" Microsoft.AspNetCore.Identity.UI" Version =" 3.0.0-preview* " />
11+ <PackageReference Include =" Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version =" 3.0.0-preview* " />
12+ <PackageReference Include =" Microsoft.EntityFrameworkCore.Tools" Version =" 3.0.0-preview* " >
1313 <PrivateAssets >all</PrivateAssets >
1414 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
1515 </PackageReference >
16- <PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" Version =" 3.0.0-preview7.19352.17 " />
17- <PackageReference Include =" Microsoft.EntityFrameworkCore.SqlServer" Version =" 3.0.0-preview7.19352.17 " />
18- <PackageReference Include =" Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version =" 3.0.0-preview7.19353.9 " />
16+ <PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" Version =" 3.0.0-preview* " />
17+ <PackageReference Include =" Microsoft.EntityFrameworkCore.SqlServer" Version =" 3.0.0-preview* " />
18+ <PackageReference Include =" Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version =" 3.0.0-preview* " />
1919 <PackageReference Include =" Microsoft.AspNet.WebApi.Client" Version =" 5.2.7" />
20- <PackageReference Include =" Microsoft.VisualStudio.Web.CodeGeneration.Design" Version =" 3.0.0-preview6-19319-03 " >
20+ <PackageReference Include =" Microsoft.VisualStudio.Web.CodeGeneration.Design" Version =" 3.0.0-preview* " >
2121 <PrivateAssets >all</PrivateAssets >
2222 </PackageReference >
2323 </ItemGroup >
Original file line number Diff line number Diff line change 11using System . Threading . Tasks ;
2- using FrontEnd . Services ;
3- using FrontEnd . Pages . Models ;
42using Microsoft . AspNetCore . Mvc ;
53using Microsoft . AspNetCore . Mvc . RazorPages ;
6- using Microsoft . AspNetCore . Authorization ;
7- using Microsoft . AspNetCore . Mvc . Filters ;
84using Microsoft . Extensions . Caching . Memory ;
95using FrontEnd . Infrastructure ;
6+ using FrontEnd . Pages . Models ;
7+ using FrontEnd . Services ;
108
119namespace FrontEnd . Pages
1210{
Original file line number Diff line number Diff line change 1+ @attribute [Authorize("Admin")]
You can’t perform that action at this time.
0 commit comments