浏览代码

remove api , move XML into WebApp and setup deployment on ASP app on Azure

Florian Morel 1 年之前
父节点
当前提交
1089996603
共有 40 个文件被更改,包括 221 次插入7349 次删除
  1. 二进制
      .vs/slnx.sqlite
  2. 0 36
      Dotnet/DataLayer/DataLayer.csproj
  3. 51 39
      Dotnet/DataLayer/DbContextInitializer.cs
  4. 二进制
      Dotnet/DataLayer/bin/Release/net9.0/DataLayer.dll
  5. 二进制
      Dotnet/DataLayer/bin/Release/net9.0/DataLayer.pdb
  6. 0 1923
      Dotnet/DataLayer/bin/Release/net9.0/XML/01 - ldb.xml
  7. 0 1228
      Dotnet/DataLayer/bin/Release/net9.0/XML/02 - traité inquisitorial.xml
  8. 0 89
      Dotnet/DataLayer/bin/Release/net9.0/XML/03 - disciples des dieux sombres.xml
  9. 0 63
      Dotnet/DataLayer/bin/Release/net9.0/XML/04 - créatures et anathèmes.xml
  10. 0 432
      Dotnet/DataLayer/bin/Release/net9.0/XML/05 - inquisiteurs et radicaux.xml
  11. 0 1832
      Dotnet/DataLayer/bin/Release/net9.0/XML/06 - ascension.xml
  12. 0 797
      Dotnet/DataLayer/bin/Release/net9.0/XML/07 - le sang des martyrs.xml
  13. 0 434
      Dotnet/DataLayer/bin/Release/net9.0/XML/08 - chasseur de démons.xml
  14. 0 343
      Dotnet/DataLayer/bin/Release/net9.0/XML/09 - book of judgement.xml
  15. 0 10
      Dotnet/DataLayer/bin/Release/net9.0/XML/50 - perso.xml
  16. 0 27
      Dotnet/DataLayer/bin/Release/net9.0/XML/contrib - agent inquisitorial.xml
  17. 0 45
      Dotnet/DataLayer/bin/Release/net9.0/XML/contrib - agrimonde.xml
  18. 0 13
      Dotnet/Deathwatch/Data/WeatherForecast.cs
  19. 0 20
      Dotnet/Deathwatch/Data/WeatherForecastService.cs
  20. 40 1
      Dotnet/Deathwatch/Deathwatch.csproj
  21. 2 2
      Dotnet/Deathwatch/Deathwatch.csproj.user
  22. 9 4
      Dotnet/Deathwatch/Dockerfile
  23. 5 3
      Dotnet/Deathwatch/Program.cs
  24. 113 0
      Dotnet/Deathwatch/Properties/ServiceDependencies/deathwatchweb - Web Deploy/profile.arm.json
  25. 1 1
      Dotnet/Deathwatch/Properties/launchSettings.json
  26. 0 0
      Dotnet/Deathwatch/XML/01 - ldb.xml
  27. 0 0
      Dotnet/Deathwatch/XML/02 - rites de bataille.xml
  28. 0 0
      Dotnet/Deathwatch/XML/02 - traité inquisitorial.xml
  29. 0 0
      Dotnet/Deathwatch/XML/03 - disciples des dieux sombres.xml
  30. 0 0
      Dotnet/Deathwatch/XML/04 - créatures et anathèmes.xml
  31. 0 0
      Dotnet/Deathwatch/XML/05 - inquisiteurs et radicaux.xml
  32. 0 0
      Dotnet/Deathwatch/XML/06 - ascension.xml
  33. 0 0
      Dotnet/Deathwatch/XML/07 - le sang des martyrs.xml
  34. 0 0
      Dotnet/Deathwatch/XML/08 - chasseur de démons.xml
  35. 0 0
      Dotnet/Deathwatch/XML/09 - book of judgement.xml
  36. 0 0
      Dotnet/Deathwatch/XML/50 - perso.xml
  37. 0 0
      Dotnet/Deathwatch/XML/contrib - agent inquisitorial.xml
  38. 0 0
      Dotnet/Deathwatch/XML/contrib - agrimonde.xml
  39. 0 1
      Dotnet/Deathwatch/outputfile.json
  40. 0 6
      Dotnet/Warhammer.sln

二进制
.vs/slnx.sqlite


+ 0 - 36
Dotnet/DataLayer/DataLayer.csproj

@@ -29,42 +29,6 @@
     <None Update="XMLTEST\01 - ldb.xml">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Update="XML\01 - ldb.xml">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Update="XML\02 - traité inquisitorial.xml">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Update="XML\03 - disciples des dieux sombres.xml">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Update="XML\04 - créatures et anathèmes.xml">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Update="XML\05 - inquisiteurs et radicaux.xml">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Update="XML\06 - ascension.xml">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Update="XML\07 - le sang des martyrs.xml">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Update="XML\08 - chasseur de démons.xml">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Update="XML\09 - book of judgement.xml">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Update="XML\50 - perso.xml">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Update="XML\contrib - agent inquisitorial.xml">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Update="XML\contrib - agrimonde.xml">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
   </ItemGroup>
 
 </Project>

+ 51 - 39
Dotnet/DataLayer/DbContextInitializer.cs

@@ -8,7 +8,7 @@ namespace DataLayer;
 
 public static class DbContextInitializer
 {
-    public static void Initialize(DeathwatchDbContext context)
+    public static void Initialize(DeathwatchDbContext context, string filepath = null)
     {
         context.Database.EnsureCreated();
 
@@ -43,36 +43,50 @@ public static class DbContextInitializer
         foreach (var player in players) context.Players.Add(player);
         context.SaveChanges();
 
-        SeedDatabase(context);
+        SeedDatabase(context, filepath);
     }
 
-    public static void SeedDatabase(DeathwatchDbContext context)
+    public static void SeedDatabase(DeathwatchDbContext context, string filesPath = null)
     {
         // Define the paths to the XML files
-        var parent = Directory.GetParent(Directory.GetCurrentDirectory()).Parent;
-        var folderPath = Path.Combine($"{parent}", "Dotnet", "DataLayer", "XML");
-        var xmlFiles = Directory.GetFiles(folderPath, "*.xml");
 
         //string accessoireFilePath = Path.Combine("XML", "Accessoires.xml");
         //string ameliorationFilePath = Path.Combine("XML", "Ameliorations.xml");
         //string extensionFilePath = Path.Combine("XML", "Extensions.xml");
-        var roots = new List<Root>();
-        try
+        if (!string.IsNullOrEmpty(filesPath))
         {
+            var roots = new List<Root>();
+            try
+            {
+                // Deserialize the XML files
+                GetRootsElements(roots, filesPath);
+                ExtractFromRoot(context, roots);
 
-            foreach (var xmlFile in xmlFiles)
+            }
+            catch (Exception e)
             {
-                var root = XmlHelper.DeserializeXmlFile<Root>(xmlFile);
-                roots.Add(root);
+                throw;
             }
         }
-        catch (Exception e)
+    }
+
+    private static void GetRootsElements(List<Root> roots, string filesPath)
+    {
+        var fileExist = Directory.Exists(filesPath);
+        if (fileExist)
         {
+            var xmlFiles = Directory.GetFiles(filesPath, "*.xml");
 
-            throw;
+            foreach (var xmlFile in xmlFiles)
+            {
+                var root = XmlHelper.DeserializeXmlFile<Root>(xmlFile);
+                roots.Add(root);
+            }
         }
+    }
 
-        // Deserialize the XML files
+    private static void ExtractFromRoot(DeathwatchDbContext context, List<Root> roots)
+    {
         foreach (var root in roots)
         {
             if (root != null)
@@ -104,144 +118,142 @@ public static class DbContextInitializer
                 if (root.Armes != null && root.Armes != null && !context.Armes.Any())
                 {
                     context.Armes.AddRange(root.Armes);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Armures != null && root.Armures != null && !context.Armures.Any())
                 {
                     context.Armures.AddRange(root.Armures);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Assermentations != null && root.Assermentations != null && !context.Assermentations.Any())
                 {
                     context.Assermentations.AddRange(root.Assermentations);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.AttributsArmes != null && root.AttributsArmes != null && !context.Attributs.Any())
                 {
                     context.Attributs.AddRange(root.AttributsArmes);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Carrières != null && root.Carrières != null && !context.Carrières.Any())
                 {
                     context.Carrières.AddRange(root.Carrières);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Competences != null && root.Competences != null && !context.Competences.Any())
                 {
                     context.Competences.AddRange(root.Competences);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Coordonnées != null && root.Coordonnées != null && !context.Coordonnées.Any())
                 {
                     context.Coordonnées.AddRange(root.Coordonnées);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Cybernétiques != null && root.Cybernétiques != null && !context.Cybernétiques.Any())
                 {
                     context.Cybernétiques.AddRange(root.Cybernétiques);
 
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Disciplines != null && root.Disciplines != null && !context.Disciplines.Any())
                 {
                     context.Disciplines.AddRange(root.Disciplines);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Divinations != null && root.Divinations != null && !context.Divinations.Any())
                 {
                     context.Divinations.AddRange(root.Divinations);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Equipements != null && root.Equipements != null && !context.Equipements.Any())
                 {
                     context.Equipements.AddRange(root.Equipements);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Implants != null && root.Implants != null && !context.Implants.Any())
                 {
                     context.Implants.AddRange(root.Implants);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Mondes != null && root.Mondes != null && !context.Mondes.Any())
                 {
                     context.Mondes.AddRange(root.Mondes);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Mutations != null && root.Mutations != null && !context.Mutations.Any())
                 {
                     context.Mutations.AddRange(root.Mutations);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Pouvoirs != null && root.Pouvoirs != null && !context.Pouvoirs.Any())
                 {
                     context.Pouvoirs.AddRange(root.Pouvoirs);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Promotions != null && root.Promotions != null && !context.Promotions.Any())
                 {
                     context.Promotions.AddRange(root.Promotions);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.SeuilsXp != null && root.SeuilsXp != null && !context.Seuils.Any())
                 {
                     context.Seuils.AddRange(root.SeuilsXp);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Sousmondes != null && root.Sousmondes != null && !context.Sousmondes.Any())
                 {
                     context.Sousmondes.AddRange(root.Sousmondes);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Talents != null && root.Talents != null && !context.Talents.Any())
                 {
                     context.Talents.AddRange(root.Talents);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Traits != null && root.Traits != null && !context.Traits.Any())
                 {
                     context.Traits.AddRange(root.Traits);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.Troubles != null && root.Troubles != null && !context.Troubles.Any())
                 {
                     context.Troubles.AddRange(root.Troubles);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.TypeMondes != null && root.TypeMondes != null && !context.TypeMondes.Any())
                 {
                     context.TypeMondes.AddRange(root.TypeMondes);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
 
                 if (root.TypesNom != null && root.TypesNom != null && !context.TypesNom.Any())
                 {
                     context.TypesNom.AddRange(root.TypesNom);
-        context.SaveChanges();
+                    context.SaveChanges();
                 }
             }
         }
-
-
     }
 }

二进制
Dotnet/DataLayer/bin/Release/net9.0/DataLayer.dll


二进制
Dotnet/DataLayer/bin/Release/net9.0/DataLayer.pdb


文件差异内容过多而无法显示
+ 0 - 1923
Dotnet/DataLayer/bin/Release/net9.0/XML/01 - ldb.xml


文件差异内容过多而无法显示
+ 0 - 1228
Dotnet/DataLayer/bin/Release/net9.0/XML/02 - traité inquisitorial.xml


文件差异内容过多而无法显示
+ 0 - 89
Dotnet/DataLayer/bin/Release/net9.0/XML/03 - disciples des dieux sombres.xml


文件差异内容过多而无法显示
+ 0 - 63
Dotnet/DataLayer/bin/Release/net9.0/XML/04 - créatures et anathèmes.xml


文件差异内容过多而无法显示
+ 0 - 432
Dotnet/DataLayer/bin/Release/net9.0/XML/05 - inquisiteurs et radicaux.xml


文件差异内容过多而无法显示
+ 0 - 1832
Dotnet/DataLayer/bin/Release/net9.0/XML/06 - ascension.xml


文件差异内容过多而无法显示
+ 0 - 797
Dotnet/DataLayer/bin/Release/net9.0/XML/07 - le sang des martyrs.xml


文件差异内容过多而无法显示
+ 0 - 434
Dotnet/DataLayer/bin/Release/net9.0/XML/08 - chasseur de démons.xml


文件差异内容过多而无法显示
+ 0 - 343
Dotnet/DataLayer/bin/Release/net9.0/XML/09 - book of judgement.xml


+ 0 - 10
Dotnet/DataLayer/bin/Release/net9.0/XML/50 - perso.xml

@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<root>
-  <extensions>
-    <extension id="dh50" nom="perso" auteur="perso" />
-  </extensions>
-  
-
-
-  </root>

+ 0 - 27
Dotnet/DataLayer/bin/Release/net9.0/XML/contrib - agent inquisitorial.xml

@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<root>
-  <extensions>
-    <extension id="dhai" nom="agent inquisitorial" auteur="pierrick" contrib="true" />
-  </extensions>
-  
-  <améliorations>
-    <amélioration id="dhai-amel01" catégorie="expérience vécue" souscatégorie="agent inquisitorial" promotion="1" type="comp" nom="codes secrets (acolyte)" cout="100" nb_max_ou_rang="1" />
-    <amélioration id="dhai-amel02" catégorie="expérience vécue" souscatégorie="agent inquisitorial" promotion="1" type="comp" nom="connaissances interdites (hérésie)" cout="100" nb_max_ou_rang="1" />
-    <amélioration id="dhai-amel03" catégorie="expérience vécue" souscatégorie="agent inquisitorial" promotion="1" type="comp" nom="connaissances interdites (inquisition)" cout="100" nb_max_ou_rang="1" />
-    <amélioration id="dhai-amel04" catégorie="expérience vécue" souscatégorie="agent inquisitorial" promotion="1" type="comp" nom="connaissances interdites (psykers)" cout="100" nb_max_ou_rang="1" />
-    <amélioration id="dhai-amel05" catégorie="expérience vécue" souscatégorie="agent inquisitorial" promotion="1" type="comp" nom="connaissances interdites (xenos)" cout="100" nb_max_ou_rang="1" />
-    <amélioration id="dhai-amel06" catégorie="expérience vécue" souscatégorie="agent inquisitorial" promotion="1" type="comp" nom="enquête" cout="100" nb_max_ou_rang="1" />
-    <amélioration id="dhai-amel07" catégorie="expérience vécue" souscatégorie="agent inquisitorial" promotion="1" type="comp" nom="langage secret (acolytes)" cout="100" nb_max_ou_rang="1" />
-    <amélioration id="dhai-amel08" catégorie="expérience vécue" souscatégorie="agent inquisitorial" promotion="1" type="comp" nom="psychologie" cout="100" nb_max_ou_rang="1" />
-    <amélioration id="dhai-amel09" catégorie="expérience vécue" souscatégorie="agent inquisitorial" promotion="1" type="comp" nom="vigilance" cout="100" nb_max_ou_rang="1" />
-    <amélioration id="dhai-amel10" catégorie="expérience vécue" souscatégorie="agent inquisitorial" promotion="1" type="comp" nom="alphabétisation" cout="200" nb_max_ou_rang="1" />
-    <amélioration id="dhai-amel11" catégorie="expérience vécue" souscatégorie="agent inquisitorial" promotion="1" type="talent" nom="haine (au choix)" cout="200" nb_max_ou_rang="1" />
-    <amélioration id="dhai-amel12" catégorie="expérience vécue" souscatégorie="agent inquisitorial" promotion="1" type="talent" nom="talentueux (au choix)" cout="200" nb_max_ou_rang="1" />
-  </améliorations>
-
-  <xp_vécues>
-    <xp_vécue id="dhai-xpvécue01" nom="agent inquisitorial" condition="-" effet="-" description="si un nombre considérable de nouvelles recrues disparait tragiquement en accomplissant son devoir, au service d'un inquisiteur, les acolytes survivants deviennent les dépositaires de connaissances et de compétences qui restent hors d'atteinte de la plupart des citoyens impériaux. seul le meneur de jeu peut proposer l'accès à cette expérience vécue." />
-  </xp_vécues>
-    
-  </root>

文件差异内容过多而无法显示
+ 0 - 45
Dotnet/DataLayer/bin/Release/net9.0/XML/contrib - agrimonde.xml


+ 0 - 13
Dotnet/Deathwatch/Data/WeatherForecast.cs

@@ -1,13 +0,0 @@
-namespace Deathwatch.Data
-{
-    public class WeatherForecast
-    {
-        public DateTime Date { get; set; }
-
-        public int TemperatureC { get; set; }
-
-        public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
-
-        public string? Summary { get; set; }
-    }
-}

+ 0 - 20
Dotnet/Deathwatch/Data/WeatherForecastService.cs

@@ -1,20 +0,0 @@
-namespace Deathwatch.Data
-{
-    public class WeatherForecastService
-    {
-        private static readonly string[] Summaries = new[]
-        {
-            "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
-        };
-
-        public Task<WeatherForecast[]> GetForecastAsync(DateTime startDate)
-        {
-            return Task.FromResult(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());
-        }
-    }
-}

+ 40 - 1
Dotnet/Deathwatch/Deathwatch.csproj

@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk.Web">
+<Project Sdk="Microsoft.NET.Sdk.Web">
 
   <PropertyGroup>
     <TargetFramework>net9.0</TargetFramework>
@@ -28,4 +28,43 @@
     <ProjectReference Include="..\Services\Services.csproj" />
   </ItemGroup>
 
+  <ItemGroup>
+    <None Update="XML\01 - ldb.xml">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="XML\02 - traité inquisitorial.xml">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="XML\03 - disciples des dieux sombres.xml">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="XML\04 - créatures et anathèmes.xml">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="XML\05 - inquisiteurs et radicaux.xml">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="XML\06 - ascension.xml">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="XML\07 - le sang des martyrs.xml">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="XML\08 - chasseur de démons.xml">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="XML\09 - book of judgement.xml">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="XML\50 - perso.xml">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="XML\contrib - agent inquisitorial.xml">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="XML\contrib - agrimonde.xml">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+  </ItemGroup>
+
 </Project>

+ 2 - 2
Dotnet/Deathwatch/Deathwatch.csproj.user

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <ActiveDebugProfile>IIS Express</ActiveDebugProfile>
+    <ActiveDebugProfile>Container (Dockerfile)</ActiveDebugProfile>
     <RazorPage_SelectedScaffolderID>RazorPageScaffolder</RazorPage_SelectedScaffolderID>
     <RazorPage_SelectedScaffolderCategoryPath>root/Common/RazorPage</RazorPage_SelectedScaffolderCategoryPath>
-    <NameOfLastUsedPublishProfile>C:\Users\FlorianMorel\Source\Repos\Warhammer\Dotnet\Deathwatch\Properties\PublishProfiles\Deathwatch20241202153149 - Web Deploy.pubxml</NameOfLastUsedPublishProfile>
+    <NameOfLastUsedPublishProfile>C:\Users\FlorianMorel\Source\Repos\Warhammer\Dotnet\Deathwatch\Properties\PublishProfiles\deathwatchweb - Web Deploy.pubxml</NameOfLastUsedPublishProfile>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
     <DebuggerFlavor>ProjectDebugger</DebuggerFlavor>

+ 9 - 4
Dotnet/Deathwatch/Dockerfile

@@ -4,17 +4,22 @@
 # For more information, please see https://aka.ms/containercompat
 
 # This stage is used when running from VS in fast mode (Default for Debug configuration)
-FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
+FROM mcr.microsoft.com/dotnet/aspnet:9.0-nanoserver-1809 AS base
 WORKDIR /app
-EXPOSE 80
-EXPOSE 443
+EXPOSE 8080
+EXPOSE 8081
 
 
 # This stage is used to build the service project
-FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
+FROM mcr.microsoft.com/dotnet/sdk:9.0-nanoserver-1809 AS build
 ARG BUILD_CONFIGURATION=Release
 WORKDIR /src
+
 COPY ["Deathwatch/Deathwatch.csproj", "Deathwatch/"]
+COPY ["DataLayer/DataLayer.csproj", "DataLayer/"]
+COPY ["Domain/Domain.csproj", "Domain/"]
+COPY ["Infrastructure/Infrastructure.csproj", "Infrastructure/"]
+COPY ["Services/Services.csproj", "Services/"]
 RUN dotnet restore "./Deathwatch/Deathwatch.csproj"
 COPY . .
 WORKDIR "/src/Deathwatch"

+ 5 - 3
Dotnet/Deathwatch/Program.cs

@@ -1,6 +1,5 @@
 using DataLayer;
 using DataLayer.Interfaces;
-using Deathwatch.Data;
 using Microsoft.EntityFrameworkCore;
 using Services;
 using Services.Interfaces;
@@ -10,7 +9,6 @@ var builder = WebApplication.CreateBuilder(args);
 // Add services to the container.
 builder.Services.AddRazorPages();
 builder.Services.AddServerSideBlazor();
-builder.Services.AddSingleton<WeatherForecastService>();
 
 builder.Services.AddDbContext<DeathwatchDbContext>(options =>
     options.UseInMemoryDatabase("InMemoryDb"));
@@ -27,10 +25,14 @@ var app = builder.Build();
 var scopeFactory = app.Services.GetRequiredService<IServiceScopeFactory>();
 using (var scope = scopeFactory.CreateScope())
 {
+    //var parent = Directory.GetParent(Directory.GetCurrentDirectory()).Parent;
+    var directory = Directory.GetCurrentDirectory();
+    //var folderPath = Path.Combine($"{directory}", "Dotnet", "Deathwatch", "XML");
+    var folderPath = Path.Combine($"{directory}", "XML");
     var db = scope.ServiceProvider.GetRequiredService<DeathwatchDbContext>();
     if (db.Database.EnsureCreated())
     {
-        DbContextInitializer.Initialize(db);
+        DbContextInitializer.Initialize(db, folderPath);
     }
 }
 

+ 113 - 0
Dotnet/Deathwatch/Properties/ServiceDependencies/deathwatchweb - Web Deploy/profile.arm.json

@@ -0,0 +1,113 @@
+{
+  "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
+  "contentVersion": "1.0.0.0",
+  "metadata": {
+    "_dependencyType": "compute.appService.windows"
+  },
+  "parameters": {
+    "resourceGroupName": {
+      "type": "string",
+      "defaultValue": "Bench",
+      "metadata": {
+        "description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
+      }
+    },
+    "resourceGroupLocation": {
+      "type": "string",
+      "defaultValue": "uaenorth",
+      "metadata": {
+        "description": "Location of the resource group. Resource groups could have different location than resources, however by default we use API versions from latest hybrid profile which support all locations for resource types we support."
+      }
+    },
+    "resourceName": {
+      "type": "string",
+      "defaultValue": "deathwatchweb",
+      "metadata": {
+        "description": "Name of the main resource to be created by this template."
+      }
+    },
+    "resourceLocation": {
+      "type": "string",
+      "defaultValue": "[parameters('resourceGroupLocation')]",
+      "metadata": {
+        "description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
+      }
+    }
+  },
+  "variables": {
+    "appServicePlan_name": "[concat('Plan', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
+    "appServicePlan_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/serverFarms/', variables('appServicePlan_name'))]"
+  },
+  "resources": [
+    {
+      "type": "Microsoft.Resources/resourceGroups",
+      "name": "[parameters('resourceGroupName')]",
+      "location": "[parameters('resourceGroupLocation')]",
+      "apiVersion": "2019-10-01"
+    },
+    {
+      "type": "Microsoft.Resources/deployments",
+      "name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
+      "resourceGroup": "[parameters('resourceGroupName')]",
+      "apiVersion": "2019-10-01",
+      "dependsOn": [
+        "[parameters('resourceGroupName')]"
+      ],
+      "properties": {
+        "mode": "Incremental",
+        "template": {
+          "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+          "contentVersion": "1.0.0.0",
+          "resources": [
+            {
+              "location": "[parameters('resourceLocation')]",
+              "name": "[parameters('resourceName')]",
+              "type": "Microsoft.Web/sites",
+              "apiVersion": "2015-08-01",
+              "tags": {
+                "[concat('hidden-related:', variables('appServicePlan_ResourceId'))]": "empty"
+              },
+              "dependsOn": [
+                "[variables('appServicePlan_ResourceId')]"
+              ],
+              "kind": "app",
+              "properties": {
+                "name": "[parameters('resourceName')]",
+                "kind": "app",
+                "httpsOnly": true,
+                "reserved": false,
+                "serverFarmId": "[variables('appServicePlan_ResourceId')]",
+                "siteConfig": {
+                  "metadata": [
+                    {
+                      "name": "CURRENT_STACK",
+                      "value": "dotnetcore"
+                    }
+                  ]
+                }
+              },
+              "identity": {
+                "type": "SystemAssigned"
+              }
+            },
+            {
+              "location": "[parameters('resourceLocation')]",
+              "name": "[variables('appServicePlan_name')]",
+              "type": "Microsoft.Web/serverFarms",
+              "apiVersion": "2015-08-01",
+              "sku": {
+                "name": "S1",
+                "tier": "Standard",
+                "family": "S",
+                "size": "S1"
+              },
+              "properties": {
+                "name": "[variables('appServicePlan_name')]"
+              }
+            }
+          ]
+        }
+      }
+    }
+  ]
+}

+ 1 - 1
Dotnet/Deathwatch/Properties/launchSettings.json

@@ -21,7 +21,7 @@
       "launchBrowser": true,
       "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
       "environmentVariables": {
-        "ASPNETCORE_URLS": "https://+:443;http://+:80"
+        "ASPNETCORE_URLS": "https://+:8080;http://+:8081"
       },
       "publishAllPorts": true,
       "useSSL": true

Dotnet/DataLayer/XML/01 - ldb.xml → Dotnet/Deathwatch/XML/01 - ldb.xml


Dotnet/DataLayer/XML/02 - rites de bataille.xml → Dotnet/Deathwatch/XML/02 - rites de bataille.xml


Dotnet/DataLayer/XML/02 - traité inquisitorial.xml → Dotnet/Deathwatch/XML/02 - traité inquisitorial.xml


Dotnet/DataLayer/XML/03 - disciples des dieux sombres.xml → Dotnet/Deathwatch/XML/03 - disciples des dieux sombres.xml


Dotnet/DataLayer/XML/04 - créatures et anathèmes.xml → Dotnet/Deathwatch/XML/04 - créatures et anathèmes.xml


Dotnet/DataLayer/XML/05 - inquisiteurs et radicaux.xml → Dotnet/Deathwatch/XML/05 - inquisiteurs et radicaux.xml


Dotnet/DataLayer/XML/06 - ascension.xml → Dotnet/Deathwatch/XML/06 - ascension.xml


Dotnet/DataLayer/XML/07 - le sang des martyrs.xml → Dotnet/Deathwatch/XML/07 - le sang des martyrs.xml


Dotnet/DataLayer/XML/08 - chasseur de démons.xml → Dotnet/Deathwatch/XML/08 - chasseur de démons.xml


Dotnet/DataLayer/XML/09 - book of judgement.xml → Dotnet/Deathwatch/XML/09 - book of judgement.xml


Dotnet/DataLayer/XML/50 - perso.xml → Dotnet/Deathwatch/XML/50 - perso.xml


Dotnet/DataLayer/XML/contrib - agent inquisitorial.xml → Dotnet/Deathwatch/XML/contrib - agent inquisitorial.xml


Dotnet/DataLayer/XML/contrib - agrimonde.xml → Dotnet/Deathwatch/XML/contrib - agrimonde.xml


+ 0 - 1
Dotnet/Deathwatch/outputfile.json

@@ -1 +0,0 @@
-{}

+ 0 - 6
Dotnet/Warhammer.sln

@@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio Version 17
 VisualStudioVersion = 17.1.32421.90
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Warhammer", "Warhammer\Warhammer.csproj", "{CAC4117F-9DAA-4631-8AFE-7CB1FE2183F6}"
-EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Domain", "Domain\Domain.csproj", "{6513BB0B-4DC1-483F-887E-F40C8603FC2B}"
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Services", "Services\Services.csproj", "{8FA3AA34-0FC6-4C63-8D77-46A94C6BBB17}"
@@ -21,10 +19,6 @@ Global
 		Release|Any CPU = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{CAC4117F-9DAA-4631-8AFE-7CB1FE2183F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{CAC4117F-9DAA-4631-8AFE-7CB1FE2183F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{CAC4117F-9DAA-4631-8AFE-7CB1FE2183F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{CAC4117F-9DAA-4631-8AFE-7CB1FE2183F6}.Release|Any CPU.Build.0 = Release|Any CPU
 		{6513BB0B-4DC1-483F-887E-F40C8603FC2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{6513BB0B-4DC1-483F-887E-F40C8603FC2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{6513BB0B-4DC1-483F-887E-F40C8603FC2B}.Release|Any CPU.ActiveCfg = Release|Any CPU