Skip to content

Commit f45cf76

Browse files
committed
work in progress
1 parent dd531d1 commit f45cf76

File tree

8 files changed

+52
-7
lines changed

8 files changed

+52
-7
lines changed

Directory.Packages.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<PropertyGroup>
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
4+
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
55
</PropertyGroup>
66
<ItemGroup>
77
<PackageVersion Include="altcover" Version="8.8.173" />
@@ -62,6 +62,7 @@
6262
<PackageVersion Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.13" />
6363
<PackageVersion Include="NETStandard.Library" Version="2.0.3" />
6464
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
65+
<PackageVersion Include="NimblePros.Metronome" Version="0.4.1" />
6566
<PackageVersion Include="NimblePros.Vimeo" Version="1.0.10" />
6667
<PackageVersion Include="NSubstitute" Version="5.1.0" />
6768
<PackageVersion Include="ReportGenerator" Version="5.1.25" />

src/DevBetterWeb.Web/DevBetterWeb.Web.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
</PackageReference>
4949
<PackageReference Include="Microsoft.Web.LibraryManager.Build" />
5050
<PackageReference Include="Newtonsoft.Json" />
51+
<PackageReference Include="NimblePros.Metronome" />
5152
<PackageReference Include="NimblePros.Vimeo" />
5253
<PackageReference Include="Sendgrid" />
5354
<PackageReference Include="Serilog" />

src/DevBetterWeb.Web/Program.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
using DevBetterWeb.Infrastructure;
3232
using Microsoft.Extensions.Configuration;
3333
using NimblePros.Vimeo.Extensions;
34+
using NimblePros.Metronome;
3435

3536
// 29 Aug 2023 - Getting a nullref in here somewhere maybe? Also a stack overflow during startup somewhere.
3637

@@ -72,6 +73,8 @@
7273
builder.Services.AddStartupNotificationService();
7374
}
7475

76+
builder.Services.AddMetronome();
77+
7578
// TEST SERVICES
7679
//if (builder.Environment.EnvironmentName.ToLower() == "testing")
7780
//{
@@ -83,9 +86,11 @@
8386

8487
if (!builder.Services.Any(x => x.ServiceType == typeof(AppDbContext)))
8588
{
86-
builder.Services.AddDbContext<AppDbContext>(options =>
89+
builder.Services.AddDbContext<AppDbContext>((provider, options) =>
8790
options.UseSqlServer(builder.Configuration
88-
.GetConnectionString(Constants.DEFAULT_CONNECTION_STRING_NAME)));
91+
.GetConnectionString(Constants.DEFAULT_CONNECTION_STRING_NAME))
92+
.AddMetronomeDbTracking(provider)
93+
);
8994
}
9095
builder.Services.AddScoped(typeof(IRepository<>), typeof(EfRepository<>));
9196

@@ -167,6 +172,7 @@
167172
{
168173
app.UseDeveloperExceptionPage();
169174
app.UseShowAllServicesMiddleware();
175+
app.UseMetronomeLoggingMiddleware();
170176
}
171177
else
172178
{

src/DevBetterWeb.Web/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"videoUrlPrefix": "https://devbetter2storage.blob.core.windows.net/videos/",
66
"GoogleMapsAPIKey": "GOOGLE_MAPS_API_KEY",
77
"ConnectionStrings": {
8-
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=DevBetterWeb.App;Trusted_Connection=True;MultipleActiveResultSets=true"
8+
"DefaultConnection": "Server=localhost\\sqlexpress;Database=DevBetterWeb.App;Trusted_Connection=False;MultipleActiveResultSets=true"
99
},
1010
"VimeoSettings": {
1111
"Token": "[vimeo token string goes here]",

tests/DevBetterWeb.FunctionalTests/DevBetterWeb.FunctionalTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

tests/DevBetterWeb.Tests/DevBetterWeb.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
3+
<TargetFramework>net9.0</TargetFramework>
44
<PreserveCompilationContext>true</PreserveCompilationContext>
55
<LangVersion>latest</LangVersion>
66
<Nullable>enable</Nullable>

tests/DevBetterWeb.UnitTests/DevBetterWeb.UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
3+
<TargetFramework>net9.0</TargetFramework>
44
<Nullable>enable</Nullable>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>

tests/tests.sln

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.5.002.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevBetterWeb.FunctionalTests", "DevBetterWeb.FunctionalTests\DevBetterWeb.FunctionalTests.csproj", "{23B85581-53F6-48C2-B7C2-0BD71DB45B5D}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevBetterWeb.Tests", "DevBetterWeb.Tests\DevBetterWeb.Tests.csproj", "{0002B2C1-F170-4000-83A2-6FA27305F756}"
9+
EndProject
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevBetterWeb.UnitTests", "DevBetterWeb.UnitTests\DevBetterWeb.UnitTests.csproj", "{B24654DE-E71E-41E3-9F26-5652FA15B763}"
11+
EndProject
12+
Global
13+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
14+
Debug|Any CPU = Debug|Any CPU
15+
Release|Any CPU = Release|Any CPU
16+
EndGlobalSection
17+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18+
{23B85581-53F6-48C2-B7C2-0BD71DB45B5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19+
{23B85581-53F6-48C2-B7C2-0BD71DB45B5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
20+
{23B85581-53F6-48C2-B7C2-0BD71DB45B5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
21+
{23B85581-53F6-48C2-B7C2-0BD71DB45B5D}.Release|Any CPU.Build.0 = Release|Any CPU
22+
{0002B2C1-F170-4000-83A2-6FA27305F756}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23+
{0002B2C1-F170-4000-83A2-6FA27305F756}.Debug|Any CPU.Build.0 = Debug|Any CPU
24+
{0002B2C1-F170-4000-83A2-6FA27305F756}.Release|Any CPU.ActiveCfg = Release|Any CPU
25+
{0002B2C1-F170-4000-83A2-6FA27305F756}.Release|Any CPU.Build.0 = Release|Any CPU
26+
{B24654DE-E71E-41E3-9F26-5652FA15B763}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27+
{B24654DE-E71E-41E3-9F26-5652FA15B763}.Debug|Any CPU.Build.0 = Debug|Any CPU
28+
{B24654DE-E71E-41E3-9F26-5652FA15B763}.Release|Any CPU.ActiveCfg = Release|Any CPU
29+
{B24654DE-E71E-41E3-9F26-5652FA15B763}.Release|Any CPU.Build.0 = Release|Any CPU
30+
EndGlobalSection
31+
GlobalSection(SolutionProperties) = preSolution
32+
HideSolutionNode = FALSE
33+
EndGlobalSection
34+
GlobalSection(ExtensibilityGlobals) = postSolution
35+
SolutionGuid = {3E0D51B1-E07B-4DAF-BBAF-E1D77481BD8D}
36+
EndGlobalSection
37+
EndGlobal

0 commit comments

Comments
 (0)