mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 10:42:08 +00:00
Initialize solution structure and add WebAPI project
This commit is contained in:
9
BusinessLayer/BusinessLayer.csproj
Normal file
9
BusinessLayer/BusinessLayer.csproj
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
6
DataAccessLayer/Class1.cs
Normal file
6
DataAccessLayer/Class1.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace DataAccessLayer;
|
||||||
|
|
||||||
|
public class Class1
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
9
DataAccessLayer/DataAccessLayer.csproj
Normal file
9
DataAccessLayer/DataAccessLayer.csproj
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
0
DataAccessLayer/entities/UserAccount.cs
Normal file
0
DataAccessLayer/entities/UserAccount.cs
Normal file
0
DataAccessLayer/entities/UserCredential.cs
Normal file
0
DataAccessLayer/entities/UserCredential.cs
Normal file
0
DataAccessLayer/entities/UserVerification.cs
Normal file
0
DataAccessLayer/entities/UserVerification.cs
Normal file
@@ -4,8 +4,7 @@ using System.Text;
|
|||||||
using Konscious.Security.Cryptography;
|
using Konscious.Security.Cryptography;
|
||||||
using Microsoft.Data.SqlClient;
|
using Microsoft.Data.SqlClient;
|
||||||
|
|
||||||
|
string ConnectionString = Environment.GetEnvironmentVariable("SEEDDB_CONNECTION_STRING")!;
|
||||||
string ConnectionString = Environment.GetEnvironmentVariable("SEEDDB_CONNECTION_STRING")!;
|
|
||||||
|
|
||||||
static async Task BuildSchema(SqlConnection connection)
|
static async Task BuildSchema(SqlConnection connection)
|
||||||
{
|
{
|
||||||
42
WebAPI/Program.cs
Normal file
42
WebAPI/Program.cs
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
|
// Add services to the container.
|
||||||
|
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
|
||||||
|
builder.Services.AddOpenApi();
|
||||||
|
|
||||||
|
var app = builder.Build();
|
||||||
|
|
||||||
|
// Configure the HTTP request pipeline.
|
||||||
|
if (app.Environment.IsDevelopment())
|
||||||
|
{
|
||||||
|
app.MapOpenApi();
|
||||||
|
}
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
app.UseStaticFiles();
|
||||||
|
app.Run();
|
||||||
|
|
||||||
|
record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary)
|
||||||
|
{
|
||||||
|
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||||
|
}
|
||||||
23
WebAPI/Properties/launchSettings.json
Normal file
23
WebAPI/Properties/launchSettings.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||||
|
"profiles": {
|
||||||
|
"http": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"dotnetRunMessages": true,
|
||||||
|
"launchBrowser": false,
|
||||||
|
"applicationUrl": "http://localhost:5069",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"https": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"dotnetRunMessages": true,
|
||||||
|
"launchBrowser": false,
|
||||||
|
"applicationUrl": "https://localhost:7002;http://localhost:5069",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
13
WebAPI/WebAPI.csproj
Normal file
13
WebAPI/WebAPI.csproj
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.11" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
6
WebAPI/WebAPI.http
Normal file
6
WebAPI/WebAPI.http
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
@WebAPI_HostAddress = http://localhost:5069
|
||||||
|
|
||||||
|
GET {{WebAPI_HostAddress}}/weatherforecast/
|
||||||
|
Accept: application/json
|
||||||
|
|
||||||
|
###
|
||||||
8
WebAPI/appsettings.Development.json
Normal file
8
WebAPI/appsettings.Development.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft.AspNetCore": "Warning"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
WebAPI/appsettings.json
Normal file
9
WebAPI/appsettings.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft.AspNetCore": "Warning"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowedHosts": "*"
|
||||||
|
}
|
||||||
@@ -3,7 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.14.36603.0
|
VisualStudioVersion = 17.14.36603.0
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedDB", "SeedDB\SeedDB.csproj", "{45F7F75E-FD8D-4862-9BDB-6E59F6941DFB}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataLayer", "DataLayer\DataLayer.csproj", "{F8223224-F3B7-4D9D-A701-9F0ADDA20792}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataAccessLayer", "DataAccessLayer\DataAccessLayer.csproj", "{5B2A93D1-007B-42D1-8F76-E1BF25F9B3B4}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebAPI", "WebAPI\WebAPI.csproj", "{D6B25565-723E-4F79-AA83-A48A3C3DD6C2}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BusinessLayer", "BusinessLayer\BusinessLayer.csproj", "{EC30D3C4-34BB-4824-A0C5-6802BAAA6C48}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@@ -15,18 +21,54 @@ Global
|
|||||||
Release|x86 = Release|x86
|
Release|x86 = Release|x86
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{45F7F75E-FD8D-4862-9BDB-6E59F6941DFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{F8223224-F3B7-4D9D-A701-9F0ADDA20792}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{45F7F75E-FD8D-4862-9BDB-6E59F6941DFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{F8223224-F3B7-4D9D-A701-9F0ADDA20792}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{45F7F75E-FD8D-4862-9BDB-6E59F6941DFB}.Debug|x64.ActiveCfg = Debug|Any CPU
|
{F8223224-F3B7-4D9D-A701-9F0ADDA20792}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
{45F7F75E-FD8D-4862-9BDB-6E59F6941DFB}.Debug|x64.Build.0 = Debug|Any CPU
|
{F8223224-F3B7-4D9D-A701-9F0ADDA20792}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
{45F7F75E-FD8D-4862-9BDB-6E59F6941DFB}.Debug|x86.ActiveCfg = Debug|Any CPU
|
{F8223224-F3B7-4D9D-A701-9F0ADDA20792}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
{45F7F75E-FD8D-4862-9BDB-6E59F6941DFB}.Debug|x86.Build.0 = Debug|Any CPU
|
{F8223224-F3B7-4D9D-A701-9F0ADDA20792}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
{45F7F75E-FD8D-4862-9BDB-6E59F6941DFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{F8223224-F3B7-4D9D-A701-9F0ADDA20792}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{45F7F75E-FD8D-4862-9BDB-6E59F6941DFB}.Release|Any CPU.Build.0 = Release|Any CPU
|
{F8223224-F3B7-4D9D-A701-9F0ADDA20792}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{45F7F75E-FD8D-4862-9BDB-6E59F6941DFB}.Release|x64.ActiveCfg = Release|Any CPU
|
{F8223224-F3B7-4D9D-A701-9F0ADDA20792}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
{45F7F75E-FD8D-4862-9BDB-6E59F6941DFB}.Release|x64.Build.0 = Release|Any CPU
|
{F8223224-F3B7-4D9D-A701-9F0ADDA20792}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{45F7F75E-FD8D-4862-9BDB-6E59F6941DFB}.Release|x86.ActiveCfg = Release|Any CPU
|
{F8223224-F3B7-4D9D-A701-9F0ADDA20792}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{45F7F75E-FD8D-4862-9BDB-6E59F6941DFB}.Release|x86.Build.0 = Release|Any CPU
|
{F8223224-F3B7-4D9D-A701-9F0ADDA20792}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{5B2A93D1-007B-42D1-8F76-E1BF25F9B3B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{5B2A93D1-007B-42D1-8F76-E1BF25F9B3B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{5B2A93D1-007B-42D1-8F76-E1BF25F9B3B4}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{5B2A93D1-007B-42D1-8F76-E1BF25F9B3B4}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{5B2A93D1-007B-42D1-8F76-E1BF25F9B3B4}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{5B2A93D1-007B-42D1-8F76-E1BF25F9B3B4}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{5B2A93D1-007B-42D1-8F76-E1BF25F9B3B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{5B2A93D1-007B-42D1-8F76-E1BF25F9B3B4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{5B2A93D1-007B-42D1-8F76-E1BF25F9B3B4}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{5B2A93D1-007B-42D1-8F76-E1BF25F9B3B4}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{5B2A93D1-007B-42D1-8F76-E1BF25F9B3B4}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{5B2A93D1-007B-42D1-8F76-E1BF25F9B3B4}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{D6B25565-723E-4F79-AA83-A48A3C3DD6C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{D6B25565-723E-4F79-AA83-A48A3C3DD6C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{D6B25565-723E-4F79-AA83-A48A3C3DD6C2}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{D6B25565-723E-4F79-AA83-A48A3C3DD6C2}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{D6B25565-723E-4F79-AA83-A48A3C3DD6C2}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{D6B25565-723E-4F79-AA83-A48A3C3DD6C2}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{D6B25565-723E-4F79-AA83-A48A3C3DD6C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{D6B25565-723E-4F79-AA83-A48A3C3DD6C2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{D6B25565-723E-4F79-AA83-A48A3C3DD6C2}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{D6B25565-723E-4F79-AA83-A48A3C3DD6C2}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{D6B25565-723E-4F79-AA83-A48A3C3DD6C2}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{D6B25565-723E-4F79-AA83-A48A3C3DD6C2}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{EC30D3C4-34BB-4824-A0C5-6802BAAA6C48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{EC30D3C4-34BB-4824-A0C5-6802BAAA6C48}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{EC30D3C4-34BB-4824-A0C5-6802BAAA6C48}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{EC30D3C4-34BB-4824-A0C5-6802BAAA6C48}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{EC30D3C4-34BB-4824-A0C5-6802BAAA6C48}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{EC30D3C4-34BB-4824-A0C5-6802BAAA6C48}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{EC30D3C4-34BB-4824-A0C5-6802BAAA6C48}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{EC30D3C4-34BB-4824-A0C5-6802BAAA6C48}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{EC30D3C4-34BB-4824-A0C5-6802BAAA6C48}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{EC30D3C4-34BB-4824-A0C5-6802BAAA6C48}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{EC30D3C4-34BB-4824-A0C5-6802BAAA6C48}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{EC30D3C4-34BB-4824-A0C5-6802BAAA6C48}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
Reference in New Issue
Block a user