File tree Expand file tree Collapse file tree 3 files changed +17
-12
lines changed Expand file tree Collapse file tree 3 files changed +17
-12
lines changed Original file line number Diff line number Diff line change 11
22using System ;
3- using System . Collections . Generic ;
43using System . Linq ;
54using System . Threading . Tasks ;
65using AutoMapper ;
@@ -255,7 +254,5 @@ private string FixupSort(string? sort)
255254 _ => "LocalPp"
256255 } ;
257256 }
258-
259-
260257 }
261258}
Original file line number Diff line number Diff line change 1+ using System . IO ;
2+ using Microsoft . AspNetCore ;
13using Microsoft . AspNetCore . Hosting ;
2- using Microsoft . Extensions . Hosting ;
4+ using Microsoft . Extensions . Configuration ;
35
46namespace WebPerformanceCalculator
57{
@@ -10,13 +12,18 @@ public static void Main(string[] args)
1012 CreateHostBuilder ( args ) . Build ( ) . Run ( ) ;
1113 }
1214
13- public static IHostBuilder CreateHostBuilder ( string [ ] args )
15+ public static IConfiguration Configuration { get ; private set ; } = new ConfigurationBuilder ( )
16+ . SetBasePath ( Directory . GetCurrentDirectory ( ) )
17+ . AddJsonFile ( "appsettings.json" , optional : false , reloadOnChange : true )
18+ . AddEnvironmentVariables ( )
19+ . Build ( ) ;
20+
21+ public static IWebHostBuilder CreateHostBuilder ( string [ ] args )
1422 {
15- return Host . CreateDefaultBuilder ( args )
16- . ConfigureWebHostDefaults ( webBuilder =>
17- {
18- webBuilder . UseStartup < Startup > ( ) ;
19- } ) ;
23+ return WebHost . CreateDefaultBuilder ( args )
24+ . UseConfiguration ( Configuration )
25+ . UseSentry ( )
26+ . UseStartup < Startup > ( ) ;
2027 }
2128 }
2229}
Original file line number Diff line number Diff line change 99 <ItemGroup >
1010 <PackageReference Include =" AutoMapper" Version =" 10.1.1" />
1111 <PackageReference Include =" AutoMapper.Extensions.Microsoft.DependencyInjection" Version =" 8.1.1" />
12- <PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" Version =" 5.0.4 " />
13- <PackageReference Include =" Microsoft.EntityFrameworkCore.Tools" Version =" 5.0.4 " >
12+ <PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" Version =" 5.0.6 " />
13+ <PackageReference Include =" Microsoft.EntityFrameworkCore.Tools" Version =" 5.0.6 " >
1414 <PrivateAssets >all</PrivateAssets >
1515 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
1616 </PackageReference >
1717 <PackageReference Include =" Newtonsoft.Json" Version =" 13.0.1" />
1818 <PackageReference Include =" RunProcessAsTask" Version =" 1.2.4" />
19+ <PackageReference Include =" Sentry.AspNetCore" Version =" 3.3.4" />
1920 <PackageReference Include =" System.Runtime.Caching" Version =" 5.0.0" />
2021 </ItemGroup >
2122
You can’t perform that action at this time.
0 commit comments