Compare commits
4 Commits
mcmuzzle-p
...
fe721e3600
| Author | SHA1 | Date | |
|---|---|---|---|
| fe721e3600 | |||
| 2ca0338351 | |||
| d3b8f0c644 | |||
| 564154b86d |
@@ -6,7 +6,6 @@ root = true
|
|||||||
dotnet_diagnostic.IDE1006.severity = warning
|
dotnet_diagnostic.IDE1006.severity = warning
|
||||||
dotnet_diagnostic.IDE0005.severity = error
|
dotnet_diagnostic.IDE0005.severity = error
|
||||||
dotnet_diagnostic.CA5394.severity = none
|
dotnet_diagnostic.CA5394.severity = none
|
||||||
dotnet_diagnostic.CA1848.severity = none #optimisatio logger pas nécessaire
|
|
||||||
|
|
||||||
# Exclude generated code
|
# Exclude generated code
|
||||||
[src/**/Migrations/*.cs]
|
[src/**/Migrations/*.cs]
|
||||||
|
|||||||
@@ -1,36 +1,34 @@
|
|||||||
name: "Generation data pour merge sur master"
|
name: "Main Build Process"
|
||||||
|
|
||||||
|
# Runs on main branch commits,
|
||||||
|
# every commit in a pull request, any published release.
|
||||||
on:
|
on:
|
||||||
pull_request:
|
push:
|
||||||
types:
|
|
||||||
- closed
|
|
||||||
branches: ["main"]
|
branches: ["main"]
|
||||||
|
pull_request:
|
||||||
|
branches: ["main"]
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generateData:
|
asciidoc:
|
||||||
if: github.event.pull_request.merged == true
|
name: "generate documentation"
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Get build container
|
- name: Get build container
|
||||||
id: adocbuild
|
id: adocbuild
|
||||||
uses: tonynv/asciidoctor-action@master
|
uses: tonynv/asciidoctor-action@master
|
||||||
with:
|
with:
|
||||||
program: "asciidoctor -D docs --backend=html5 -o index.html documentation/readme.adoc"
|
program: "asciidoctor -D docs --backend=html5 -o index.html documentation/index.adoc"
|
||||||
- name: Print execution time
|
- name: Print execution time
|
||||||
run: echo "Time ${{ steps.adocbuild.outputs.time }}"
|
run: echo "Time ${{ steps.adocbuild.outputs.time }}"
|
||||||
- name: Upload artifact
|
- name: Deploy docs to ghpages
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Doc
|
name: Doc
|
||||||
path: ./docs
|
path: ./docs
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
- name: build docker images
|
|
||||||
run: docker build -t gitea.borealian.ovh/mcmuzzle/ludikzone:latest -f ./docker-prod/Dockerfile .
|
|
||||||
- name: upload image
|
|
||||||
run: |
|
|
||||||
echo "${{ secrets.PERSO_GITEAPASSWORD}}" | docker login gitea.borealian.ovh --username mcmuzzle --password-stdin
|
|
||||||
docker push gitea.borealian.ovh/mcmuzzle/ludikzone:latest
|
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
name: "Generation data pour merge sur master"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ["main"]
|
|
||||||
pull_request:
|
|
||||||
branches: ["main"]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
reviewProcess:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Setup dotnet
|
|
||||||
uses: actions/setup-dotnet@v3
|
|
||||||
with:
|
|
||||||
dotnet-version: '10.0.x'
|
|
||||||
- name: Install dependencies
|
|
||||||
run: dotnet restore ./src/LudikZone.sln
|
|
||||||
- name: Build
|
|
||||||
run: dotnet build ./src/LudikZone.sln
|
|
||||||
- name: Test with the dotnet CLI
|
|
||||||
run: dotnet test ./src/LudikZone.sln
|
|
||||||
|
|
||||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -16,8 +16,4 @@ bin
|
|||||||
obj
|
obj
|
||||||
report
|
report
|
||||||
tools/
|
tools/
|
||||||
TestResults
|
TestResults
|
||||||
|
|
||||||
#docker data
|
|
||||||
/docker-dev/data
|
|
||||||
/docker-prod/data
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
services:
|
|
||||||
postgresql:
|
|
||||||
image: postgres:18
|
|
||||||
ports:
|
|
||||||
- "${DB_PORT:-5432}:5432"
|
|
||||||
volumes:
|
|
||||||
- ./data/postgres/:/var/lib/postgresql/data
|
|
||||||
environment:
|
|
||||||
- POSTGRES_DB=${DB_DATABASE:-ludikZone}
|
|
||||||
- POSTGRES_USER=${DB_USER:-admin}
|
|
||||||
- POSTGRES_PASSWORD=${DB_PASSWORD:-admin}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
DB_HOST="postgresql"
|
|
||||||
DB_PORT=5432
|
|
||||||
DB_USER="admin"
|
|
||||||
DB_PASSWORD="admin"
|
|
||||||
DB_DATABASE="ludikZone"
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
DB_HOST="localhost"
|
|
||||||
DB_PORT=5432
|
|
||||||
DB_USER="admin"
|
|
||||||
DB_PASSWORD="admin"
|
|
||||||
DB_DATABASE="ludikZone"
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
|
|
||||||
WORKDIR /app
|
|
||||||
EXPOSE 80
|
|
||||||
EXPOSE 443
|
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
|
||||||
WORKDIR /src
|
|
||||||
COPY ["src/LudikZoneBlazor/LudikZoneBlazor.csproj", "src/LudikZoneBlazor/LudikZoneBlazor.csproj"]
|
|
||||||
RUN dotnet restore "src/LudikZoneBlazor/LudikZoneBlazor.csproj"
|
|
||||||
COPY src src
|
|
||||||
RUN ls -a -l
|
|
||||||
RUN dotnet build "src/LudikZoneBlazor/LudikZoneBlazor.csproj" -c Release -o /app/build
|
|
||||||
|
|
||||||
FROM build AS publish
|
|
||||||
WORKDIR /src
|
|
||||||
RUN dotnet publish "src/LudikZoneBlazor/LudikZoneBlazor.csproj" -c Release -o /app/publish
|
|
||||||
|
|
||||||
FROM base AS final
|
|
||||||
WORKDIR /app
|
|
||||||
COPY --from=publish /app/publish .
|
|
||||||
ENTRYPOINT ["dotnet", "LudikZoneBlazor.dll"]
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
services:
|
|
||||||
postgresql:
|
|
||||||
image: postgres:18
|
|
||||||
ports:
|
|
||||||
- "${DB_PORT:-5432}:5432"
|
|
||||||
volumes:
|
|
||||||
- ./data/postgres/:/var/lib/postgresql/data
|
|
||||||
environment:
|
|
||||||
- POSTGRES_DB=${DB_DATABASE:-ludikZone}
|
|
||||||
- POSTGRES_USER=${DB_USER:-admin}
|
|
||||||
- POSTGRES_PASSWORD=${DB_PASSWORD:-admin}
|
|
||||||
|
|
||||||
ludikzone:
|
|
||||||
image: gitea.borealian.ovh/mcmuzzle/ludikzone:latest
|
|
||||||
ports:
|
|
||||||
- 8080:8080
|
|
||||||
environment:
|
|
||||||
- DB_HOST=${DB_HOST:-"postgresql"}
|
|
||||||
- DB_PORT=${DB_PORT:-5432}
|
|
||||||
- DB_USER=${DB_USER:-"admin"}
|
|
||||||
- DB_PASSWORD=${DB_PASSWORD:-"admin"}
|
|
||||||
- DB_DATABASE=${DB_DATABASE:-"ludikZone"}
|
|
||||||
depends_on:
|
|
||||||
- postgresql
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
=== Prérequis
|
|
||||||
|
|
||||||
* DotNet 8
|
|
||||||
* Docker (26.0.2 minimum recommandé)
|
|
||||||
* Docker Compose (2.26.1 minimum recommandé)
|
|
||||||
|
|
||||||
|
|
||||||
=== Cloner le dépot
|
|
||||||
|
|
||||||
=== Lancer les containers
|
|
||||||
|
|
||||||
[,sh]
|
|
||||||
----
|
|
||||||
docker compose -f .\docker-dev\compose.yml -p ludik-zone up -d
|
|
||||||
----
|
|
||||||
|
|
||||||
=== Migrer la bdd
|
|
||||||
|
|
||||||
Lors de la migration de la BDD, les données de connections seront celles du *appsettings.Development.json*
|
|
||||||
[,sh]
|
|
||||||
----
|
|
||||||
dotnet ef database update --project .\src\LudikZoneBlazor\LudikZoneBlazor.csproj
|
|
||||||
----
|
|
||||||
1
documentation/index.adoc
Normal file
1
documentation/index.adoc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Hello world
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
= Ludik zone documentation (DEX)
|
|
||||||
:source-highlighter: pygments
|
|
||||||
:source-language: bash
|
|
||||||
:doctype: book
|
|
||||||
:source-highlighter: rouge
|
|
||||||
:toc: macro
|
|
||||||
:toc-title: Table des matières
|
|
||||||
|
|
||||||
toc::[]
|
|
||||||
|
|
||||||
== Présentation
|
|
||||||
|
|
||||||
Le projet Ludik zone est un projet open source ayant comme objectif de créer un portait hébergeant différent jeux en tour par tour.
|
|
||||||
|
|
||||||
|
|
||||||
== Instalation du poste de dev
|
|
||||||
|
|
||||||
include::{docdir}/documentation_technique/installation-poste.adoc[]
|
|
||||||
|
|
||||||
== Architecture du projet
|
|
||||||
|
|
||||||
include::{docdir}/documentation_technique/architecture-projet.adoc[]
|
|
||||||
|
|
||||||
== Developpement et livraison
|
|
||||||
|
|
||||||
include::{docdir}/documentation_technique/developpement-livraison.adoc[]
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": [
|
|
||||||
"config:base"
|
|
||||||
],
|
|
||||||
"packageRules": [
|
|
||||||
{
|
|
||||||
"updateTypes": ["minor", "patch", "pin", "digest"],
|
|
||||||
"automerge": false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
||||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
|
||||||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
|
||||||
<AnalysisMode>All</AnalysisMode>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
namespace LudikZone.model;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Informations relative a un jeu précis
|
|
||||||
/// </summary>
|
|
||||||
public class Game
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary> Identifiant unique d'un jeu </summary>
|
|
||||||
public int Id { get; init; }
|
|
||||||
|
|
||||||
/// <summary> le nom du jeu </summary>
|
|
||||||
public required string Name { get; init; }
|
|
||||||
|
|
||||||
/// <summary> Le nombre minimum de joueur pour une partie </summary>
|
|
||||||
public int MinPlayerCount { get; init; }
|
|
||||||
|
|
||||||
/// <summary> Le nombre maximum de joueur pour une partie </summary>
|
|
||||||
public int MaxPlayerCount { get; init; }
|
|
||||||
}
|
|
||||||
@@ -5,8 +5,6 @@ VisualStudioVersion = 17.0.31903.59
|
|||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LudikZoneBlazor", "LudikZoneBlazor\LudikZoneBlazor.csproj", "{79AF398A-0AC3-425C-BA51-B6CFBEECAC28}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LudikZoneBlazor", "LudikZoneBlazor\LudikZoneBlazor.csproj", "{79AF398A-0AC3-425C-BA51-B6CFBEECAC28}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LudikZone.model", "LudikZone.model\LudikZone.model.csproj", "{C50658FF-0EE9-4EE8-AAA3-FAF4B9F622EA}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -20,9 +18,5 @@ Global
|
|||||||
{79AF398A-0AC3-425C-BA51-B6CFBEECAC28}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{79AF398A-0AC3-425C-BA51-B6CFBEECAC28}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{79AF398A-0AC3-425C-BA51-B6CFBEECAC28}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{79AF398A-0AC3-425C-BA51-B6CFBEECAC28}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{79AF398A-0AC3-425C-BA51-B6CFBEECAC28}.Release|Any CPU.Build.0 = Release|Any CPU
|
{79AF398A-0AC3-425C-BA51-B6CFBEECAC28}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{C50658FF-0EE9-4EE8-AAA3-FAF4B9F622EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{C50658FF-0EE9-4EE8-AAA3-FAF4B9F622EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{C50658FF-0EE9-4EE8-AAA3-FAF4B9F622EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{C50658FF-0EE9-4EE8-AAA3-FAF4B9F622EA}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ internal static class IdentityComponentsEndpointRouteBuilderExtensions
|
|||||||
SignInManager<ApplicationUser> signInManager,
|
SignInManager<ApplicationUser> signInManager,
|
||||||
[FromForm] string returnUrl) =>
|
[FromForm] string returnUrl) =>
|
||||||
{
|
{
|
||||||
await signInManager.SignOutAsync().ConfigureAwait(true);
|
await signInManager.SignOutAsync();
|
||||||
return TypedResults.LocalRedirect($"~/{returnUrl}");
|
return TypedResults.LocalRedirect($"~/{returnUrl}");
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ internal static class IdentityComponentsEndpointRouteBuilderExtensions
|
|||||||
[FromForm] string provider) =>
|
[FromForm] string provider) =>
|
||||||
{
|
{
|
||||||
// Clear the existing external cookie to ensure a clean login process
|
// Clear the existing external cookie to ensure a clean login process
|
||||||
await context.SignOutAsync(IdentityConstants.ExternalScheme).ConfigureAwait(false);
|
await context.SignOutAsync(IdentityConstants.ExternalScheme);
|
||||||
|
|
||||||
var redirectUrl = UriHelper.BuildRelative(
|
var redirectUrl = UriHelper.BuildRelative(
|
||||||
context.Request.PathBase,
|
context.Request.PathBase,
|
||||||
@@ -76,13 +76,13 @@ internal static class IdentityComponentsEndpointRouteBuilderExtensions
|
|||||||
[FromServices] UserManager<ApplicationUser> userManager,
|
[FromServices] UserManager<ApplicationUser> userManager,
|
||||||
[FromServices] AuthenticationStateProvider authenticationStateProvider) =>
|
[FromServices] AuthenticationStateProvider authenticationStateProvider) =>
|
||||||
{
|
{
|
||||||
var user = await userManager.GetUserAsync(context.User).ConfigureAwait(false);
|
var user = await userManager.GetUserAsync(context.User);
|
||||||
if (user is null)
|
if (user is null)
|
||||||
{
|
{
|
||||||
return Results.NotFound($"Unable to load user with ID '{userManager.GetUserId(context.User)}'.");
|
return Results.NotFound($"Unable to load user with ID '{userManager.GetUserId(context.User)}'.");
|
||||||
}
|
}
|
||||||
|
|
||||||
var userId = await userManager.GetUserIdAsync(user).ConfigureAwait(false);
|
var userId = await userManager.GetUserIdAsync(user);
|
||||||
downloadLogger.LogInformation("User with ID '{UserId}' asked for their personal data.", userId);
|
downloadLogger.LogInformation("User with ID '{UserId}' asked for their personal data.", userId);
|
||||||
|
|
||||||
// Only include personal data for download
|
// Only include personal data for download
|
||||||
@@ -94,13 +94,13 @@ internal static class IdentityComponentsEndpointRouteBuilderExtensions
|
|||||||
personalData.Add(p.Name, p.GetValue(user)?.ToString() ?? "null");
|
personalData.Add(p.Name, p.GetValue(user)?.ToString() ?? "null");
|
||||||
}
|
}
|
||||||
|
|
||||||
var logins = await userManager.GetLoginsAsync(user).ConfigureAwait(false);
|
var logins = await userManager.GetLoginsAsync(user);
|
||||||
foreach (var l in logins)
|
foreach (var l in logins)
|
||||||
{
|
{
|
||||||
personalData.Add($"{l.LoginProvider} external login provider key", l.ProviderKey);
|
personalData.Add($"{l.LoginProvider} external login provider key", l.ProviderKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
personalData.Add("Authenticator Key", (await userManager.GetAuthenticatorKeyAsync(user).ConfigureAwait(false))!);
|
personalData.Add("Authenticator Key", (await userManager.GetAuthenticatorKeyAsync(user))!);
|
||||||
var fileBytes = JsonSerializer.SerializeToUtf8Bytes(personalData);
|
var fileBytes = JsonSerializer.SerializeToUtf8Bytes(personalData);
|
||||||
|
|
||||||
context.Response.Headers.TryAdd("Content-Disposition", "attachment; filename=PersonalData.json");
|
context.Response.Headers.TryAdd("Content-Disposition", "attachment; filename=PersonalData.json");
|
||||||
|
|||||||
@@ -4,12 +4,10 @@ using LudikZoneBlazor.Data;
|
|||||||
|
|
||||||
namespace LudikZoneBlazor.Components.Account;
|
namespace LudikZoneBlazor.Components.Account;
|
||||||
|
|
||||||
#pragma warning disable CA1812 // Elle est instanciée en Injection de dependance
|
// Remove the "else if (EmailSender is IdentityNoOpEmailSender)" block from RegisterConfirmation.razor after updating with a real implementation.
|
||||||
|
|
||||||
/// <summary> Remove the "else if (EmailSender is IdentityNoOpEmailSender)" block from RegisterConfirmation.razor after updating with a real implementation. </summary>
|
|
||||||
internal sealed class IdentityNoOpEmailSender : IEmailSender<ApplicationUser>
|
internal sealed class IdentityNoOpEmailSender : IEmailSender<ApplicationUser>
|
||||||
{
|
{
|
||||||
private readonly NoOpEmailSender emailSender = new NoOpEmailSender();
|
private readonly IEmailSender emailSender = new NoOpEmailSender();
|
||||||
|
|
||||||
public Task SendConfirmationLinkAsync(ApplicationUser user, string email, string confirmationLink) =>
|
public Task SendConfirmationLinkAsync(ApplicationUser user, string email, string confirmationLink) =>
|
||||||
emailSender.SendEmailAsync(email, "Confirm your email", $"Please confirm your account by <a href='{confirmationLink}'>clicking here</a>.");
|
emailSender.SendEmailAsync(email, "Confirm your email", $"Please confirm your account by <a href='{confirmationLink}'>clicking here</a>.");
|
||||||
@@ -20,5 +18,3 @@ internal sealed class IdentityNoOpEmailSender : IEmailSender<ApplicationUser>
|
|||||||
public Task SendPasswordResetCodeAsync(ApplicationUser user, string email, string resetCode) =>
|
public Task SendPasswordResetCodeAsync(ApplicationUser user, string email, string resetCode) =>
|
||||||
emailSender.SendEmailAsync(email, "Reset your password", $"Please reset your password using the following code: {resetCode}");
|
emailSender.SendEmailAsync(email, "Reset your password", $"Please reset your password using the following code: {resetCode}");
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning restore CA1812
|
|
||||||
@@ -3,8 +3,6 @@ using Microsoft.AspNetCore.Components;
|
|||||||
|
|
||||||
namespace LudikZoneBlazor.Components.Account;
|
namespace LudikZoneBlazor.Components.Account;
|
||||||
|
|
||||||
#pragma warning disable CA1812 // Elle est instanciée en Injection de dependance
|
|
||||||
|
|
||||||
internal sealed class IdentityRedirectManager(NavigationManager navigationManager)
|
internal sealed class IdentityRedirectManager(NavigationManager navigationManager)
|
||||||
{
|
{
|
||||||
public const string StatusCookieName = "Identity.StatusMessage";
|
public const string StatusCookieName = "Identity.StatusMessage";
|
||||||
@@ -58,5 +56,3 @@ internal sealed class IdentityRedirectManager(NavigationManager navigationManage
|
|||||||
public void RedirectToCurrentPageWithStatus(string message, HttpContext context)
|
public void RedirectToCurrentPageWithStatus(string message, HttpContext context)
|
||||||
=> RedirectToWithStatus(CurrentPath, message, context);
|
=> RedirectToWithStatus(CurrentPath, message, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning restore CA1812
|
|
||||||
@@ -7,8 +7,6 @@ using LudikZoneBlazor.Data;
|
|||||||
|
|
||||||
namespace LudikZoneBlazor.Components.Account;
|
namespace LudikZoneBlazor.Components.Account;
|
||||||
|
|
||||||
#pragma warning disable CA1812 // Elle est instanciée en Injection de dependance
|
|
||||||
|
|
||||||
// This is a server-side AuthenticationStateProvider that revalidates the security stamp for the connected user
|
// This is a server-side AuthenticationStateProvider that revalidates the security stamp for the connected user
|
||||||
// every 30 minutes an interactive circuit is connected.
|
// every 30 minutes an interactive circuit is connected.
|
||||||
internal sealed class IdentityRevalidatingAuthenticationStateProvider(
|
internal sealed class IdentityRevalidatingAuthenticationStateProvider(
|
||||||
@@ -23,14 +21,14 @@ internal sealed class IdentityRevalidatingAuthenticationStateProvider(
|
|||||||
AuthenticationState authenticationState, CancellationToken cancellationToken)
|
AuthenticationState authenticationState, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
// Get the user manager from a new scope to ensure it fetches fresh data
|
// Get the user manager from a new scope to ensure it fetches fresh data
|
||||||
using AsyncServiceScope scope = scopeFactory.CreateAsyncScope();
|
await using var scope = scopeFactory.CreateAsyncScope();
|
||||||
var userManager = scope.ServiceProvider.GetRequiredService<UserManager<ApplicationUser>>();
|
var userManager = scope.ServiceProvider.GetRequiredService<UserManager<ApplicationUser>>();
|
||||||
return await ValidateSecurityStampAsync(userManager, authenticationState.User).ConfigureAwait(false);
|
return await ValidateSecurityStampAsync(userManager, authenticationState.User);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<bool> ValidateSecurityStampAsync(UserManager<ApplicationUser> userManager, ClaimsPrincipal principal)
|
private async Task<bool> ValidateSecurityStampAsync(UserManager<ApplicationUser> userManager, ClaimsPrincipal principal)
|
||||||
{
|
{
|
||||||
var user = await userManager.GetUserAsync(principal).ConfigureAwait(false);
|
var user = await userManager.GetUserAsync(principal);
|
||||||
if (user is null)
|
if (user is null)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -42,10 +40,8 @@ internal sealed class IdentityRevalidatingAuthenticationStateProvider(
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
var principalStamp = principal.FindFirstValue(options.Value.ClaimsIdentity.SecurityStampClaimType);
|
var principalStamp = principal.FindFirstValue(options.Value.ClaimsIdentity.SecurityStampClaimType);
|
||||||
var userStamp = await userManager.GetSecurityStampAsync(user).ConfigureAwait(false);
|
var userStamp = await userManager.GetSecurityStampAsync(user);
|
||||||
return principalStamp == userStamp;
|
return principalStamp == userStamp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning restore CA1812
|
|
||||||
@@ -3,13 +3,11 @@ using LudikZoneBlazor.Data;
|
|||||||
|
|
||||||
namespace LudikZoneBlazor.Components.Account;
|
namespace LudikZoneBlazor.Components.Account;
|
||||||
|
|
||||||
#pragma warning disable CA1812 // Elle est instanciée en Injection de dependance
|
|
||||||
|
|
||||||
internal sealed class IdentityUserAccessor(UserManager<ApplicationUser> userManager, IdentityRedirectManager redirectManager)
|
internal sealed class IdentityUserAccessor(UserManager<ApplicationUser> userManager, IdentityRedirectManager redirectManager)
|
||||||
{
|
{
|
||||||
public async Task<ApplicationUser> GetRequiredUserAsync(HttpContext context)
|
public async Task<ApplicationUser> GetRequiredUserAsync(HttpContext context)
|
||||||
{
|
{
|
||||||
var user = await userManager.GetUserAsync(context.User).ConfigureAwait(false);
|
var user = await userManager.GetUserAsync(context.User);
|
||||||
|
|
||||||
if (user is null)
|
if (user is null)
|
||||||
{
|
{
|
||||||
@@ -19,5 +17,3 @@ internal sealed class IdentityUserAccessor(UserManager<ApplicationUser> userMana
|
|||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning restore CA1812
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
@using LudikZone.model
|
|
||||||
|
|
||||||
<MudPaper Height="140px" Width="140px">
|
|
||||||
@Game.Name
|
|
||||||
</MudPaper>
|
|
||||||
|
|
||||||
@code {
|
|
||||||
[Parameter]
|
|
||||||
public required Game Game { get; set; }
|
|
||||||
}
|
|
||||||
@@ -4,11 +4,12 @@
|
|||||||
|
|
||||||
<MudNavMenu>
|
<MudNavMenu>
|
||||||
<MudNavLink Href="" Match="NavLinkMatch.All" Icon="@Icons.Material.Filled.Home">Home</MudNavLink>
|
<MudNavLink Href="" Match="NavLinkMatch.All" Icon="@Icons.Material.Filled.Home">Home</MudNavLink>
|
||||||
<MudNavLink Href="Games" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.VideogameAsset">Games</MudNavLink>
|
<MudNavLink Href="counter" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.Add">Counter</MudNavLink>
|
||||||
|
<MudNavLink Href="weather" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.List">Weather</MudNavLink>
|
||||||
|
<MudNavLink Href="auth" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.Lock">Auth Required</MudNavLink>
|
||||||
<AuthorizeView>
|
<AuthorizeView>
|
||||||
<Authorized>
|
<Authorized>
|
||||||
<MudNavLink Href="Account/Manage" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.Person">
|
<MudNavLink Href="Account/Manage" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.Person">@context.User.Identity?.Name</MudNavLink>
|
||||||
@context.User.Identity?.Name</MudNavLink>
|
|
||||||
<form action="Account/Logout" method="post">
|
<form action="Account/Logout" method="post">
|
||||||
<AntiforgeryToken />
|
<AntiforgeryToken />
|
||||||
<input type="hidden" name="ReturnUrl" value="@currentUrl" />
|
<input type="hidden" name="ReturnUrl" value="@currentUrl" />
|
||||||
@@ -18,10 +19,8 @@
|
|||||||
</form>
|
</form>
|
||||||
</Authorized>
|
</Authorized>
|
||||||
<NotAuthorized>
|
<NotAuthorized>
|
||||||
<MudNavLink Href="Account/Register" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.Person">
|
<MudNavLink Href="Account/Register" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.Person">Register</MudNavLink>
|
||||||
Register</MudNavLink>
|
<MudNavLink Href="Account/Login" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.Password">Login</MudNavLink>
|
||||||
<MudNavLink Href="Account/Login" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.Password">Login
|
|
||||||
</MudNavLink>
|
|
||||||
</NotAuthorized>
|
</NotAuthorized>
|
||||||
</AuthorizeView>
|
</AuthorizeView>
|
||||||
</MudNavMenu>
|
</MudNavMenu>
|
||||||
@@ -47,3 +46,5 @@
|
|||||||
NavigationManager.LocationChanged -= OnLocationChanged;
|
NavigationManager.LocationChanged -= OnLocationChanged;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
14
src/LudikZoneBlazor/Components/Pages/Auth.razor
Normal file
14
src/LudikZoneBlazor/Components/Pages/Auth.razor
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@page "/auth"
|
||||||
|
|
||||||
|
@using Microsoft.AspNetCore.Authorization
|
||||||
|
|
||||||
|
@attribute [Authorize]
|
||||||
|
|
||||||
|
<PageTitle>Auth</PageTitle>
|
||||||
|
|
||||||
|
|
||||||
|
<MudText Typo="Typo.h3" GutterBottom="true">You are authenticated!</MudText>
|
||||||
|
|
||||||
|
<AuthorizeView>
|
||||||
|
<MudText Class="mb-4">Hello @context.User.Identity?.Name!</MudText>
|
||||||
|
</AuthorizeView>
|
||||||
18
src/LudikZoneBlazor/Components/Pages/Counter.razor
Normal file
18
src/LudikZoneBlazor/Components/Pages/Counter.razor
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
@page "/counter"
|
||||||
|
|
||||||
|
<PageTitle>Counter</PageTitle>
|
||||||
|
|
||||||
|
<MudText Typo="Typo.h3" GutterBottom="true">Counter</MudText>
|
||||||
|
|
||||||
|
<MudText Typo="Typo.body1" Class="mb-4">Current count: @currentCount</MudText>
|
||||||
|
|
||||||
|
<MudButton Color="Color.Primary" Variant="Variant.Filled" @onclick="IncrementCount">Click me</MudButton>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
private int currentCount = 0;
|
||||||
|
|
||||||
|
private void IncrementCount()
|
||||||
|
{
|
||||||
|
currentCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
@page "/games"
|
|
||||||
|
|
||||||
@using LudikZoneBlazor.Components.Games
|
|
||||||
@using LudikZoneBlazor.Data
|
|
||||||
@using Microsoft.AspNetCore.Authorization
|
|
||||||
|
|
||||||
@using LudikZone.model
|
|
||||||
|
|
||||||
@inject IStringLocalizer<Games> localizer
|
|
||||||
@inject ApplicationDbContext context
|
|
||||||
|
|
||||||
<PageTitle>@localizer["Games"]</PageTitle>
|
|
||||||
|
|
||||||
<MudText Typo="Typo.h3" GutterBottom="true">@localizer["Game list"]</MudText>
|
|
||||||
|
|
||||||
<MudGrid Spacing="10" Justify="Justify.Center">
|
|
||||||
@foreach (var g in GetGames())
|
|
||||||
{
|
|
||||||
<MudItem>
|
|
||||||
<GameIcon Game=@g />
|
|
||||||
</MudItem>
|
|
||||||
}
|
|
||||||
</MudGrid>
|
|
||||||
|
|
||||||
@code {
|
|
||||||
|
|
||||||
private List<Game> GetGames()
|
|
||||||
{
|
|
||||||
return context.Games.ToList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -39,16 +39,11 @@
|
|||||||
<br />
|
<br />
|
||||||
<MudText Typo="Typo.h6" GutterBottom="true">Prerendering</MudText>
|
<MudText Typo="Typo.h6" GutterBottom="true">Prerendering</MudText>
|
||||||
<MudText Typo="Typo.body2" GutterBottom="true">
|
<MudText Typo="Typo.body2" GutterBottom="true">
|
||||||
If you're exploring the features of .NET 8 Blazor,<br /> you might be pleasantly surprised to learn that each page
|
If you're exploring the features of .NET 8 Blazor,<br /> you might be pleasantly surprised to learn that each page is prerendered on the server,<br /> regardless of the selected render mode.<br /><br />
|
||||||
is prerendered on the server,<br /> regardless of the selected render mode.<br /><br />
|
This means that you'll need to inject all necessary services on the server,<br /> even when opting for the wasm (WebAssembly) render mode.<br /><br />
|
||||||
This means that you'll need to inject all necessary services on the server,<br /> even when opting for the wasm
|
This prerendering functionality is crucial to ensuring that WebAssembly mode feels fast and responsive,<br /> especially when it comes to initial page load times.<br /><br />
|
||||||
(WebAssembly) render mode.<br /><br />
|
For more information on how to detect prerendering and leverage the RenderContext, you can refer to the following link:
|
||||||
This prerendering functionality is crucial to ensuring that WebAssembly mode feels fast and responsive,<br />
|
<MudLink Href="https://github.com/dotnet/aspnetcore/issues/51468#issuecomment-1783568121" Target="_blank" Typo="Typo.body2" Color="Color.Primary">
|
||||||
especially when it comes to initial page load times.<br /><br />
|
|
||||||
For more information on how to detect prerendering and leverage the RenderContext, you can refer to the following
|
|
||||||
link:
|
|
||||||
<MudLink Href="https://github.com/dotnet/aspnetcore/issues/51468#issuecomment-1783568121" Target="_blank"
|
|
||||||
Typo="Typo.body2" Color="Color.Primary">
|
|
||||||
More details
|
More details
|
||||||
</MudLink>
|
</MudLink>
|
||||||
</MudText>
|
</MudText>
|
||||||
@@ -57,8 +52,7 @@
|
|||||||
<MudText Typo="Typo.h6" GutterBottom="true">InteractiveAuto</MudText>
|
<MudText Typo="Typo.h6" GutterBottom="true">InteractiveAuto</MudText>
|
||||||
<MudText Typo="Typo.body2">
|
<MudText Typo="Typo.body2">
|
||||||
A discussion on how to achieve this can be found here:
|
A discussion on how to achieve this can be found here:
|
||||||
<MudLink Href="https://github.com/dotnet/aspnetcore/issues/51468#issue-1950424116" Target="_blank" Typo="Typo.body2"
|
<MudLink Href="https://github.com/dotnet/aspnetcore/issues/51468#issue-1950424116" Target="_blank" Typo="Typo.body2" Color="Color.Primary">
|
||||||
Color="Color.Primary">
|
|
||||||
More details
|
More details
|
||||||
</MudLink>
|
</MudLink>
|
||||||
</MudText>
|
</MudText>
|
||||||
60
src/LudikZoneBlazor/Components/Pages/Weather.razor
Normal file
60
src/LudikZoneBlazor/Components/Pages/Weather.razor
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
@page "/weather"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<PageTitle>Weather</PageTitle>
|
||||||
|
|
||||||
|
<MudText Typo="Typo.h3" GutterBottom="true">Weather forecast</MudText>
|
||||||
|
<MudText Typo="Typo.body1" Class="mb-8">This component demonstrates fetching data from the server.</MudText>
|
||||||
|
|
||||||
|
@if (forecasts == null)
|
||||||
|
{
|
||||||
|
<MudProgressCircular Color="Color.Default" Indeterminate="true" />
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<MudTable Items="forecasts" Hover="true" SortLabel="Sort By" Elevation="0" AllowUnsorted="false">
|
||||||
|
<HeaderContent>
|
||||||
|
<MudTh><MudTableSortLabel InitialDirection="SortDirection.Ascending" SortBy="new Func<WeatherForecast, object>(x=>x.Date)">Date</MudTableSortLabel></MudTh>
|
||||||
|
<MudTh><MudTableSortLabel SortBy="new Func<WeatherForecast, object>(x=>x.TemperatureC)">Temp. (C)</MudTableSortLabel></MudTh>
|
||||||
|
<MudTh><MudTableSortLabel SortBy="new Func<WeatherForecast, object>(x=>x.TemperatureF)">Temp. (F)</MudTableSortLabel></MudTh>
|
||||||
|
<MudTh><MudTableSortLabel SortBy="new Func<WeatherForecast, object>(x=>x.Summary!)">Summary</MudTableSortLabel></MudTh>
|
||||||
|
</HeaderContent>
|
||||||
|
<RowTemplate>
|
||||||
|
<MudTd DataLabel="Date">@context.Date</MudTd>
|
||||||
|
<MudTd DataLabel="Temp. (C)">@context.TemperatureC</MudTd>
|
||||||
|
<MudTd DataLabel="Temp. (F)">@context.TemperatureF</MudTd>
|
||||||
|
<MudTd DataLabel="Summary">@context.Summary</MudTd>
|
||||||
|
</RowTemplate>
|
||||||
|
<PagerContent>
|
||||||
|
<MudTablePager PageSizeOptions="new int[]{50, 100}" />
|
||||||
|
</PagerContent>
|
||||||
|
</MudTable>
|
||||||
|
}
|
||||||
|
|
||||||
|
@code {
|
||||||
|
private WeatherForecast[]? forecasts;
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
// Simulate asynchronous loading to demonstrate a loading indicator
|
||||||
|
await Task.Delay(500);
|
||||||
|
|
||||||
|
var startDate = DateOnly.FromDateTime(DateTime.Now);
|
||||||
|
var summaries = new[] { "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" };
|
||||||
|
forecasts = Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
||||||
|
{
|
||||||
|
Date = startDate.AddDays(index),
|
||||||
|
TemperatureC = Random.Shared.Next(-20, 55),
|
||||||
|
Summary = summaries[Random.Shared.Next(summaries.Length)]
|
||||||
|
}).ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
private class WeatherForecast
|
||||||
|
{
|
||||||
|
public DateOnly Date { get; set; }
|
||||||
|
public int TemperatureC { get; set; }
|
||||||
|
public string? Summary { get; set; }
|
||||||
|
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,4 +12,3 @@
|
|||||||
@using MudBlazor.Services
|
@using MudBlazor.Services
|
||||||
@using LudikZoneBlazor
|
@using LudikZoneBlazor
|
||||||
@using LudikZoneBlazor.Components
|
@using LudikZoneBlazor.Components
|
||||||
@using Microsoft.Extensions.Localization
|
|
||||||
@@ -1,18 +1,8 @@
|
|||||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
using LudikZone.model;
|
|
||||||
|
|
||||||
namespace LudikZoneBlazor.Data;
|
namespace LudikZoneBlazor.Data;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Le context BDD de l'application
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="options"></param>
|
|
||||||
|
|
||||||
public class ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : IdentityDbContext<ApplicationUser>(options)
|
public class ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : IdentityDbContext<ApplicationUser>(options)
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary> Tout les jeux existant sur la plateforme </summary>
|
|
||||||
public virtual DbSet<Game> Games => Set<Game>();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Identity;
|
|||||||
|
|
||||||
namespace LudikZoneBlazor.Data;
|
namespace LudikZoneBlazor.Data;
|
||||||
|
|
||||||
/// <summary> Add profile data for application users by adding properties to the ApplicationUser class </summary>
|
// Add profile data for application users by adding properties to the ApplicationUser class
|
||||||
public class ApplicationUser : IdentityUser
|
public class ApplicationUser : IdentityUser
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,81 +1,76 @@
|
|||||||
// <auto-generated />
|
// <auto-generated />
|
||||||
using System;
|
using System;
|
||||||
using LudikZoneBlazor.Data;
|
using LudikZoneBlazor.Data;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace LudikZoneBlazor.Migrations
|
namespace LudikZoneBlazor.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ApplicationDbContext))]
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
[Migration("20240906111336_Init")]
|
[Migration("00000000000000_CreateIdentitySchema")]
|
||||||
partial class Init
|
partial class CreateIdentitySchema
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder.HasAnnotation("ProductVersion", "8.0.0");
|
||||||
.HasAnnotation("ProductVersion", "8.0.8")
|
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
||||||
|
|
||||||
modelBuilder.Entity("LudikZoneBlazor.Data.ApplicationUser", b =>
|
modelBuilder.Entity("LudikZoneBlazor.Data.ApplicationUser", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<int>("AccessFailedCount")
|
b.Property<int>("AccessFailedCount")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
b.Property<string>("ConcurrencyStamp")
|
||||||
.IsConcurrencyToken()
|
.IsConcurrencyToken()
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("Email")
|
b.Property<string>("Email")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
.HasColumnType("character varying(256)");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<bool>("EmailConfirmed")
|
b.Property<bool>("EmailConfirmed")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<bool>("LockoutEnabled")
|
b.Property<bool>("LockoutEnabled")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||||
.HasColumnType("timestamp with time zone");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("NormalizedEmail")
|
b.Property<string>("NormalizedEmail")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
.HasColumnType("character varying(256)");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("NormalizedUserName")
|
b.Property<string>("NormalizedUserName")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
.HasColumnType("character varying(256)");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("PasswordHash")
|
b.Property<string>("PasswordHash")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("PhoneNumber")
|
b.Property<string>("PhoneNumber")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<bool>("PhoneNumberConfirmed")
|
b.Property<bool>("PhoneNumberConfirmed")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<string>("SecurityStamp")
|
b.Property<string>("SecurityStamp")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<bool>("TwoFactorEnabled")
|
b.Property<bool>("TwoFactorEnabled")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<string>("UserName")
|
b.Property<string>("UserName")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
.HasColumnType("character varying(256)");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@@ -92,19 +87,19 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
b.Property<string>("ConcurrencyStamp")
|
||||||
.IsConcurrencyToken()
|
.IsConcurrencyToken()
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
.HasColumnType("character varying(256)");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("NormalizedName")
|
b.Property<string>("NormalizedName")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
.HasColumnType("character varying(256)");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@@ -119,19 +114,17 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType")
|
b.Property<string>("ClaimType")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("ClaimValue")
|
b.Property<string>("ClaimValue")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("RoleId")
|
b.Property<string>("RoleId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@@ -144,19 +137,17 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType")
|
b.Property<string>("ClaimType")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("ClaimValue")
|
b.Property<string>("ClaimValue")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@@ -168,17 +159,17 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("LoginProvider")
|
b.Property<string>("LoginProvider")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("ProviderKey")
|
b.Property<string>("ProviderKey")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName")
|
b.Property<string>("ProviderDisplayName")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.HasKey("LoginProvider", "ProviderKey");
|
b.HasKey("LoginProvider", "ProviderKey");
|
||||||
|
|
||||||
@@ -190,10 +181,10 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("RoleId")
|
b.Property<string>("RoleId")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.HasKey("UserId", "RoleId");
|
b.HasKey("UserId", "RoleId");
|
||||||
|
|
||||||
@@ -205,16 +196,16 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("LoginProvider")
|
b.Property<string>("LoginProvider")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.HasKey("UserId", "LoginProvider", "Name");
|
b.HasKey("UserId", "LoginProvider", "Name");
|
||||||
|
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using System;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace LudikZoneBlazor.Migrations
|
namespace LudikZoneBlazor.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class Init : Migration
|
public partial class CreateIdentitySchema : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
@@ -15,10 +15,10 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
name: "AspNetRoles",
|
name: "AspNetRoles",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<string>(type: "text", nullable: false),
|
Id = table.Column<string>(type: "TEXT", nullable: false),
|
||||||
Name = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
|
Name = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
|
||||||
NormalizedName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
|
NormalizedName = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
|
||||||
ConcurrencyStamp = table.Column<string>(type: "text", nullable: true)
|
ConcurrencyStamp = table.Column<string>(type: "TEXT", nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@@ -29,21 +29,21 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
name: "AspNetUsers",
|
name: "AspNetUsers",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<string>(type: "text", nullable: false),
|
Id = table.Column<string>(type: "TEXT", nullable: false),
|
||||||
UserName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
|
UserName = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
|
||||||
NormalizedUserName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
|
NormalizedUserName = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
|
||||||
Email = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
|
Email = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
|
||||||
NormalizedEmail = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
|
NormalizedEmail = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
|
||||||
EmailConfirmed = table.Column<bool>(type: "boolean", nullable: false),
|
EmailConfirmed = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||||
PasswordHash = table.Column<string>(type: "text", nullable: true),
|
PasswordHash = table.Column<string>(type: "TEXT", nullable: true),
|
||||||
SecurityStamp = table.Column<string>(type: "text", nullable: true),
|
SecurityStamp = table.Column<string>(type: "TEXT", nullable: true),
|
||||||
ConcurrencyStamp = table.Column<string>(type: "text", nullable: true),
|
ConcurrencyStamp = table.Column<string>(type: "TEXT", nullable: true),
|
||||||
PhoneNumber = table.Column<string>(type: "text", nullable: true),
|
PhoneNumber = table.Column<string>(type: "TEXT", nullable: true),
|
||||||
PhoneNumberConfirmed = table.Column<bool>(type: "boolean", nullable: false),
|
PhoneNumberConfirmed = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||||
TwoFactorEnabled = table.Column<bool>(type: "boolean", nullable: false),
|
TwoFactorEnabled = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||||
LockoutEnd = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
|
LockoutEnd = table.Column<DateTimeOffset>(type: "TEXT", nullable: true),
|
||||||
LockoutEnabled = table.Column<bool>(type: "boolean", nullable: false),
|
LockoutEnabled = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||||
AccessFailedCount = table.Column<int>(type: "integer", nullable: false)
|
AccessFailedCount = table.Column<int>(type: "INTEGER", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@@ -54,11 +54,11 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
name: "AspNetRoleClaims",
|
name: "AspNetRoleClaims",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
.Annotation("Sqlite:Autoincrement", true),
|
||||||
RoleId = table.Column<string>(type: "text", nullable: false),
|
RoleId = table.Column<string>(type: "TEXT", nullable: false),
|
||||||
ClaimType = table.Column<string>(type: "text", nullable: true),
|
ClaimType = table.Column<string>(type: "TEXT", nullable: true),
|
||||||
ClaimValue = table.Column<string>(type: "text", nullable: true)
|
ClaimValue = table.Column<string>(type: "TEXT", nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@@ -75,11 +75,11 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
name: "AspNetUserClaims",
|
name: "AspNetUserClaims",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
.Annotation("Sqlite:Autoincrement", true),
|
||||||
UserId = table.Column<string>(type: "text", nullable: false),
|
UserId = table.Column<string>(type: "TEXT", nullable: false),
|
||||||
ClaimType = table.Column<string>(type: "text", nullable: true),
|
ClaimType = table.Column<string>(type: "TEXT", nullable: true),
|
||||||
ClaimValue = table.Column<string>(type: "text", nullable: true)
|
ClaimValue = table.Column<string>(type: "TEXT", nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@@ -96,10 +96,10 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
name: "AspNetUserLogins",
|
name: "AspNetUserLogins",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
LoginProvider = table.Column<string>(type: "text", nullable: false),
|
LoginProvider = table.Column<string>(type: "TEXT", nullable: false),
|
||||||
ProviderKey = table.Column<string>(type: "text", nullable: false),
|
ProviderKey = table.Column<string>(type: "TEXT", nullable: false),
|
||||||
ProviderDisplayName = table.Column<string>(type: "text", nullable: true),
|
ProviderDisplayName = table.Column<string>(type: "TEXT", nullable: true),
|
||||||
UserId = table.Column<string>(type: "text", nullable: false)
|
UserId = table.Column<string>(type: "TEXT", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@@ -116,8 +116,8 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
name: "AspNetUserRoles",
|
name: "AspNetUserRoles",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
UserId = table.Column<string>(type: "text", nullable: false),
|
UserId = table.Column<string>(type: "TEXT", nullable: false),
|
||||||
RoleId = table.Column<string>(type: "text", nullable: false)
|
RoleId = table.Column<string>(type: "TEXT", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@@ -140,10 +140,10 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
name: "AspNetUserTokens",
|
name: "AspNetUserTokens",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
UserId = table.Column<string>(type: "text", nullable: false),
|
UserId = table.Column<string>(type: "TEXT", nullable: false),
|
||||||
LoginProvider = table.Column<string>(type: "text", nullable: false),
|
LoginProvider = table.Column<string>(type: "TEXT", nullable: false),
|
||||||
Name = table.Column<string>(type: "text", nullable: false),
|
Name = table.Column<string>(type: "TEXT", nullable: false),
|
||||||
Value = table.Column<string>(type: "text", nullable: true)
|
Value = table.Column<string>(type: "TEXT", nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
// <auto-generated />
|
// <auto-generated />
|
||||||
using System;
|
using System;
|
||||||
using LudikZoneBlazor.Data;
|
using LudikZoneBlazor.Data;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@@ -16,86 +15,59 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder.HasAnnotation("ProductVersion", "8.0.0");
|
||||||
.HasAnnotation("ProductVersion", "8.0.8")
|
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
||||||
|
|
||||||
modelBuilder.Entity("LudikZone.model.Game", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("MaxPlayerCount")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int>("MinPlayerCount")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Games");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("LudikZoneBlazor.Data.ApplicationUser", b =>
|
modelBuilder.Entity("LudikZoneBlazor.Data.ApplicationUser", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<int>("AccessFailedCount")
|
b.Property<int>("AccessFailedCount")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
b.Property<string>("ConcurrencyStamp")
|
||||||
.IsConcurrencyToken()
|
.IsConcurrencyToken()
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("Email")
|
b.Property<string>("Email")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
.HasColumnType("character varying(256)");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<bool>("EmailConfirmed")
|
b.Property<bool>("EmailConfirmed")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<bool>("LockoutEnabled")
|
b.Property<bool>("LockoutEnabled")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||||
.HasColumnType("timestamp with time zone");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("NormalizedEmail")
|
b.Property<string>("NormalizedEmail")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
.HasColumnType("character varying(256)");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("NormalizedUserName")
|
b.Property<string>("NormalizedUserName")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
.HasColumnType("character varying(256)");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("PasswordHash")
|
b.Property<string>("PasswordHash")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("PhoneNumber")
|
b.Property<string>("PhoneNumber")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<bool>("PhoneNumberConfirmed")
|
b.Property<bool>("PhoneNumberConfirmed")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<string>("SecurityStamp")
|
b.Property<string>("SecurityStamp")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<bool>("TwoFactorEnabled")
|
b.Property<bool>("TwoFactorEnabled")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<string>("UserName")
|
b.Property<string>("UserName")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
.HasColumnType("character varying(256)");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@@ -112,19 +84,19 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
b.Property<string>("ConcurrencyStamp")
|
||||||
.IsConcurrencyToken()
|
.IsConcurrencyToken()
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
.HasColumnType("character varying(256)");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("NormalizedName")
|
b.Property<string>("NormalizedName")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
.HasColumnType("character varying(256)");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@@ -139,19 +111,17 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType")
|
b.Property<string>("ClaimType")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("ClaimValue")
|
b.Property<string>("ClaimValue")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("RoleId")
|
b.Property<string>("RoleId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@@ -164,19 +134,17 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType")
|
b.Property<string>("ClaimType")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("ClaimValue")
|
b.Property<string>("ClaimValue")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@@ -188,17 +156,17 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("LoginProvider")
|
b.Property<string>("LoginProvider")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("ProviderKey")
|
b.Property<string>("ProviderKey")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName")
|
b.Property<string>("ProviderDisplayName")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.HasKey("LoginProvider", "ProviderKey");
|
b.HasKey("LoginProvider", "ProviderKey");
|
||||||
|
|
||||||
@@ -210,10 +178,10 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("RoleId")
|
b.Property<string>("RoleId")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.HasKey("UserId", "RoleId");
|
b.HasKey("UserId", "RoleId");
|
||||||
|
|
||||||
@@ -225,16 +193,16 @@ namespace LudikZoneBlazor.Migrations
|
|||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("LoginProvider")
|
b.Property<string>("LoginProvider")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.HasColumnType("text");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.HasKey("UserId", "LoginProvider", "Name");
|
b.HasKey("UserId", "LoginProvider", "Name");
|
||||||
|
|
||||||
BIN
src/LudikZoneBlazor/Data/app.db
Normal file
BIN
src/LudikZoneBlazor/Data/app.db
Normal file
Binary file not shown.
@@ -4,27 +4,21 @@
|
|||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
||||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
|
||||||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
|
||||||
<AnalysisMode>All</AnalysisMode>
|
|
||||||
|
|
||||||
<UserSecretsId>aspnet-LudikZoneBlazor-b18f2a2e-d082-4232-8521-6cacaa2a4ba2</UserSecretsId>
|
<UserSecretsId>aspnet-LudikZoneBlazor-b18f2a2e-d082-4232-8521-6cacaa2a4ba2</UserSecretsId>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="Data\app.db" CopyToOutputDirectory="PreserveNewest" ExcludeFromSingleFile="true" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.*" />
|
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.*" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.*" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.*" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.*" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.*" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.*" />
|
||||||
<PackageReference Include="MudBlazor" Version="7.*" />
|
<PackageReference Include="MudBlazor" Version="7.*" />
|
||||||
<PackageReference Include="Extensions.MudBlazor.StaticInput" Version="2.*" />
|
<PackageReference Include="Extensions.MudBlazor.StaticInput" Version="2.*" />
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.*" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\LudikZone.model\LudikZone.model.csproj" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,300 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using LudikZoneBlazor.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace LudikZoneBlazor.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ApplicationDbContext))]
|
|
||||||
[Migration("20240910202256_AjoutGames")]
|
|
||||||
partial class AjoutGames
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder
|
|
||||||
.HasAnnotation("ProductVersion", "8.0.8")
|
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
||||||
|
|
||||||
modelBuilder.Entity("LudikZone.model.Game", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("MaxPlayerCount")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int>("MinPlayerCount")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Games");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("LudikZoneBlazor.Data.ApplicationUser", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<int>("AccessFailedCount")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.HasMaxLength(256)
|
|
||||||
.HasColumnType("character varying(256)");
|
|
||||||
|
|
||||||
b.Property<bool>("EmailConfirmed")
|
|
||||||
.HasColumnType("boolean");
|
|
||||||
|
|
||||||
b.Property<bool>("LockoutEnabled")
|
|
||||||
.HasColumnType("boolean");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
|
||||||
.HasColumnType("timestamp with time zone");
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedEmail")
|
|
||||||
.HasMaxLength(256)
|
|
||||||
.HasColumnType("character varying(256)");
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedUserName")
|
|
||||||
.HasMaxLength(256)
|
|
||||||
.HasColumnType("character varying(256)");
|
|
||||||
|
|
||||||
b.Property<string>("PasswordHash")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("PhoneNumber")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<bool>("PhoneNumberConfirmed")
|
|
||||||
.HasColumnType("boolean");
|
|
||||||
|
|
||||||
b.Property<string>("SecurityStamp")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<bool>("TwoFactorEnabled")
|
|
||||||
.HasColumnType("boolean");
|
|
||||||
|
|
||||||
b.Property<string>("UserName")
|
|
||||||
.HasMaxLength(256)
|
|
||||||
.HasColumnType("character varying(256)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("NormalizedEmail")
|
|
||||||
.HasDatabaseName("EmailIndex");
|
|
||||||
|
|
||||||
b.HasIndex("NormalizedUserName")
|
|
||||||
.IsUnique()
|
|
||||||
.HasDatabaseName("UserNameIndex");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUsers", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasMaxLength(256)
|
|
||||||
.HasColumnType("character varying(256)");
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedName")
|
|
||||||
.HasMaxLength(256)
|
|
||||||
.HasColumnType("character varying(256)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("NormalizedName")
|
|
||||||
.IsUnique()
|
|
||||||
.HasDatabaseName("RoleNameIndex");
|
|
||||||
|
|
||||||
b.ToTable("AspNetRoles", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("ClaimValue")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("RoleId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetRoleClaims", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("ClaimValue")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserClaims", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("LoginProvider")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("ProviderKey")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("LoginProvider", "ProviderKey");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserLogins", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("UserId")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("RoleId")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("UserId", "RoleId");
|
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserRoles", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("UserId")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("LoginProvider")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Value")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("UserId", "LoginProvider", "Name");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserTokens", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("RoleId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("LudikZoneBlazor.Data.ApplicationUser", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("LudikZoneBlazor.Data.ApplicationUser", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("RoleId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("LudikZoneBlazor.Data.ApplicationUser", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("LudikZoneBlazor.Data.ApplicationUser", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace LudikZoneBlazor.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AjoutGames : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Games",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
|
||||||
Name = table.Column<string>(type: "text", nullable: false),
|
|
||||||
MinPlayerCount = table.Column<int>(type: "integer", nullable: false),
|
|
||||||
MaxPlayerCount = table.Column<int>(type: "integer", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Games", x => x.Id);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Games");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,6 @@ using MudBlazor.Services;
|
|||||||
using LudikZoneBlazor.Components;
|
using LudikZoneBlazor.Components;
|
||||||
using LudikZoneBlazor.Components.Account;
|
using LudikZoneBlazor.Components.Account;
|
||||||
using LudikZoneBlazor.Data;
|
using LudikZoneBlazor.Data;
|
||||||
using Npgsql;
|
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
@@ -28,20 +27,11 @@ builder.Services.AddAuthentication(options =>
|
|||||||
})
|
})
|
||||||
.AddIdentityCookies();
|
.AddIdentityCookies();
|
||||||
|
|
||||||
#region Base de données
|
var connectionString = builder.Configuration.GetConnectionString("DefaultConnection") ?? throw new InvalidOperationException("Connection string 'DefaultConnection' not found.");
|
||||||
NpgsqlConnectionStringBuilder conStrBuilder = new NpgsqlConnectionStringBuilder(builder.Configuration.GetConnectionString("DefaultConnection"));
|
|
||||||
conStrBuilder.Host = string.IsNullOrEmpty(builder.Configuration["DB_HOST"]) ? conStrBuilder.Host : builder.Configuration["DB_HOST"];
|
|
||||||
conStrBuilder.Username = string.IsNullOrEmpty(builder.Configuration["DB_USER"]) ? conStrBuilder.Username : builder.Configuration["DB_USER"];
|
|
||||||
conStrBuilder.Database = string.IsNullOrEmpty(builder.Configuration["DB_DATABASE"]) ? conStrBuilder.Database : builder.Configuration["DB_DATABASE"];
|
|
||||||
conStrBuilder.Port = int.TryParse(builder.Configuration["DB_PORT"], out int tempVal) ? tempVal : conStrBuilder.Port;
|
|
||||||
conStrBuilder.Password = builder.Configuration["DB_PASSWORD"];
|
|
||||||
|
|
||||||
builder.Services.AddDbContext<ApplicationDbContext>(options =>
|
builder.Services.AddDbContext<ApplicationDbContext>(options =>
|
||||||
options.UseNpgsql(conStrBuilder.ToString()));
|
options.UseSqlite(connectionString));
|
||||||
builder.Services.AddDatabaseDeveloperPageExceptionFilter();
|
builder.Services.AddDatabaseDeveloperPageExceptionFilter();
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
builder.Services.AddIdentityCore<ApplicationUser>(options => options.SignIn.RequireConfirmedAccount = true)
|
builder.Services.AddIdentityCore<ApplicationUser>(options => options.SignIn.RequireConfirmedAccount = true)
|
||||||
.AddEntityFrameworkStores<ApplicationDbContext>()
|
.AddEntityFrameworkStores<ApplicationDbContext>()
|
||||||
.AddSignInManager()
|
.AddSignInManager()
|
||||||
@@ -49,10 +39,6 @@ builder.Services.AddIdentityCore<ApplicationUser>(options => options.SignIn.Requ
|
|||||||
|
|
||||||
builder.Services.AddSingleton<IEmailSender<ApplicationUser>, IdentityNoOpEmailSender>();
|
builder.Services.AddSingleton<IEmailSender<ApplicationUser>, IdentityNoOpEmailSender>();
|
||||||
|
|
||||||
// Begin I18N configuration
|
|
||||||
builder.Services.AddLocalization(opts => { opts.ResourcesPath = "Resources"; });
|
|
||||||
// End I18N configuration
|
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
// Configure the HTTP request pipeline.
|
||||||
@@ -78,22 +64,4 @@ app.MapRazorComponents<App>()
|
|||||||
// Add additional endpoints required by the Identity /Account Razor components.
|
// Add additional endpoints required by the Identity /Account Razor components.
|
||||||
app.MapAdditionalIdentityEndpoints();
|
app.MapAdditionalIdentityEndpoints();
|
||||||
|
|
||||||
// Begin I18N configuration
|
|
||||||
var supportedCultures = new[] { "fr", "en" };
|
|
||||||
|
|
||||||
var localizationOptions = new RequestLocalizationOptions()
|
|
||||||
.SetDefaultCulture(supportedCultures[0])
|
|
||||||
.AddSupportedCultures(supportedCultures)
|
|
||||||
.AddSupportedUICultures(supportedCultures);
|
|
||||||
|
|
||||||
app.UseRequestLocalization(localizationOptions);
|
|
||||||
// End I18N configuration
|
|
||||||
|
|
||||||
// Appliquer les migrations automatiquement lors du démarrage
|
|
||||||
using (var scope = app.Services.CreateScope())
|
|
||||||
{
|
|
||||||
var dbContext = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>();
|
|
||||||
dbContext.Database.Migrate(); // Applique les migrations
|
|
||||||
}
|
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
|
|||||||
@@ -1,128 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0"/>
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string"/>
|
|
||||||
<xsd:attribute name="type" type="xsd:string"/>
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string"/>
|
|
||||||
<xsd:attribute ref="xml:space"/>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string"/>
|
|
||||||
<xsd:attribute name="name" type="xsd:string"/>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/>
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/>
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/>
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/>
|
|
||||||
<xsd:attribute ref="xml:space"/>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<data name="Games" xml:space="preserve">
|
|
||||||
<value>Games anglais 4</value>
|
|
||||||
<comment>comment game</comment>
|
|
||||||
</data>
|
|
||||||
<data name="Game list" xml:space="preserve">
|
|
||||||
<value>Game list</value>
|
|
||||||
<comment>title game list</comment>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
||||||
@@ -1,128 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0"/>
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string"/>
|
|
||||||
<xsd:attribute name="type" type="xsd:string"/>
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string"/>
|
|
||||||
<xsd:attribute ref="xml:space"/>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string"/>
|
|
||||||
<xsd:attribute name="name" type="xsd:string"/>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/>
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/>
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/>
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/>
|
|
||||||
<xsd:attribute ref="xml:space"/>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<data name="Games" xml:space="preserve">
|
|
||||||
<value>Games francais 4</value>
|
|
||||||
<comment>comment game</comment>
|
|
||||||
</data>
|
|
||||||
<data name="Game list" xml:space="preserve">
|
|
||||||
<value>Liste des jeux</value>
|
|
||||||
<comment>Titre de la liste des jeux</comment>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
||||||
@@ -1,16 +1,8 @@
|
|||||||
{
|
{
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "Information",
|
"Default": "Information",
|
||||||
"Microsoft.AspNetCore": "Warning"
|
"Microsoft.AspNetCore": "Warning"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"ConnectionStrings": {
|
}
|
||||||
"DefaultConnection": "host=localhost;username=admin;database=ludikZone;Pooling=false;Timeout=300;CommandTimeout=300;Port=5432;"
|
|
||||||
},
|
|
||||||
"DB_HOST": "localhost",
|
|
||||||
"DB_PORT": 5432,
|
|
||||||
"DB_USER": "admin",
|
|
||||||
"DB_PASSWORD": "admin",
|
|
||||||
"DB_DATABASE": "ludikZone"
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"DefaultConnection": "DataSource=Data\\app.db;Cache=Shared"
|
||||||
|
},
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "Information",
|
"Default": "Information",
|
||||||
"Microsoft.AspNetCore": "Warning"
|
"Microsoft.AspNetCore": "Warning"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
|
||||||
"DefaultConnection": "host=localhost;username=admin;database=ludikZone;Pooling=false;Timeout=300;CommandTimeout=300;Port=5432;"
|
|
||||||
},
|
|
||||||
"AllowedHosts": "*"
|
"AllowedHosts": "*"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user