Compare commits

...

3 Commits

Author SHA1 Message Date
467588429b refactor(API): update to use .net8 2025-07-29 14:23:55 +02:00
48724922af feat: create main project 2025-07-29 11:51:16 +02:00
8b8c85949e chore: create solution and API project 2025-07-29 11:42:19 +02:00
8 changed files with 188 additions and 0 deletions

View File

@ -0,0 +1,57 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.36221.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DigitalData.ActiveDirectory", "src\DigitalData.ActiveDirectory\DigitalData.ActiveDirectory.csproj", "{26B810C2-8D06-42CF-999F-CB508C9D2D01}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DigitalData.ActiveDirectory.API", "src\DigitalData.ActiveDirectory.API\DigitalData.ActiveDirectory.API.csproj", "{2B3A9620-E298-00ED-CC4B-A6A83F822A01}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{26B810C2-8D06-42CF-999F-CB508C9D2D01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{26B810C2-8D06-42CF-999F-CB508C9D2D01}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26B810C2-8D06-42CF-999F-CB508C9D2D01}.Debug|x64.ActiveCfg = Debug|Any CPU
{26B810C2-8D06-42CF-999F-CB508C9D2D01}.Debug|x64.Build.0 = Debug|Any CPU
{26B810C2-8D06-42CF-999F-CB508C9D2D01}.Debug|x86.ActiveCfg = Debug|Any CPU
{26B810C2-8D06-42CF-999F-CB508C9D2D01}.Debug|x86.Build.0 = Debug|Any CPU
{26B810C2-8D06-42CF-999F-CB508C9D2D01}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26B810C2-8D06-42CF-999F-CB508C9D2D01}.Release|Any CPU.Build.0 = Release|Any CPU
{26B810C2-8D06-42CF-999F-CB508C9D2D01}.Release|x64.ActiveCfg = Release|Any CPU
{26B810C2-8D06-42CF-999F-CB508C9D2D01}.Release|x64.Build.0 = Release|Any CPU
{26B810C2-8D06-42CF-999F-CB508C9D2D01}.Release|x86.ActiveCfg = Release|Any CPU
{26B810C2-8D06-42CF-999F-CB508C9D2D01}.Release|x86.Build.0 = Release|Any CPU
{2B3A9620-E298-00ED-CC4B-A6A83F822A01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B3A9620-E298-00ED-CC4B-A6A83F822A01}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B3A9620-E298-00ED-CC4B-A6A83F822A01}.Debug|x64.ActiveCfg = Debug|Any CPU
{2B3A9620-E298-00ED-CC4B-A6A83F822A01}.Debug|x64.Build.0 = Debug|Any CPU
{2B3A9620-E298-00ED-CC4B-A6A83F822A01}.Debug|x86.ActiveCfg = Debug|Any CPU
{2B3A9620-E298-00ED-CC4B-A6A83F822A01}.Debug|x86.Build.0 = Debug|Any CPU
{2B3A9620-E298-00ED-CC4B-A6A83F822A01}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B3A9620-E298-00ED-CC4B-A6A83F822A01}.Release|Any CPU.Build.0 = Release|Any CPU
{2B3A9620-E298-00ED-CC4B-A6A83F822A01}.Release|x64.ActiveCfg = Release|Any CPU
{2B3A9620-E298-00ED-CC4B-A6A83F822A01}.Release|x64.Build.0 = Release|Any CPU
{2B3A9620-E298-00ED-CC4B-A6A83F822A01}.Release|x86.ActiveCfg = Release|Any CPU
{2B3A9620-E298-00ED-CC4B-A6A83F822A01}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{26B810C2-8D06-42CF-999F-CB508C9D2D01} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{2B3A9620-E298-00ED-CC4B-A6A83F822A01} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2F00C94F-CA5D-4F53-A608-B935F0FD4B46}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.18" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,6 @@
@DigitalData.ActiveDirectory.API_HostAddress = http://localhost:5092
GET {{DigitalData.ActiveDirectory.API_HostAddress}}/weatherforecast/
Accept: application/json
###

View File

@ -0,0 +1,44 @@
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
var summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
app.MapGet("/weatherforecast", () =>
{
var forecast = Enumerable.Range(1, 5).Select(index =>
new WeatherForecast
(
DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
Random.Shared.Next(-20, 55),
summaries[Random.Shared.Next(summaries.Length)]
))
.ToArray();
return forecast;
})
.WithName("GetWeatherForecast")
.WithOpenApi();
app.Run();
record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary)
{
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
}

View File

@ -0,0 +1,41 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:34411",
"sslPort": 44378
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5092",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7221;http://localhost:5092",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

View File

@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>