Add background service and update project configuration
Added a `Worker` class as a hosted background service to log periodic messages. Updated `DigitalData.EmailProfiler.API.csproj` to include `UserSecretsId` for secure development storage and added `Microsoft.Extensions.Hosting` package. Replaced the `Controllers` folder reference with `Properties`. Updated `Program.cs` to register the `Worker` service, enable API exploration, and retain Swagger configuration.
This commit is contained in:
@@ -4,14 +4,16 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>dotnet-DigitalData.EmailProfiler.Service-e7ef6a9a-436f-48a1-b4f6-ec9381c8cb47</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Controllers\" />
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user