diff --git a/Sources/Tests/DbConsole/Migrations/20230320170448_AllMigrations.Designer.cs b/Sources/Tests/DbConsole/Migrations/20230320170448_AllMigrations.Designer.cs
deleted file mode 100644
index 90b7534..0000000
--- a/Sources/Tests/DbConsole/Migrations/20230320170448_AllMigrations.Designer.cs
+++ /dev/null
@@ -1,175 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace DbConsole.Migrations
-{
- [DbContext(typeof(SQLiteContext))]
- [Migration("20230320170448_AllMigrations")]
- partial class AllMigrations
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
-
- modelBuilder.Entity("EntityFrameWorkLib.CaseEntity", b =>
- {
- b.Property("CaseId")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("Value")
- .HasColumnType("INTEGER");
-
- b.HasKey("CaseId");
-
- b.ToTable("Case");
- });
-
- modelBuilder.Entity("EntityFrameWorkLib.GameEntity", b =>
- {
- b.Property("GameId")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("Date")
- .HasColumnType("TEXT");
-
- b.Property("Duration")
- .HasColumnType("TEXT");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("NbPlayers")
- .HasColumnType("INTEGER");
-
- b.HasKey("GameId");
-
- b.ToTable("Game");
- });
-
- modelBuilder.Entity("EntityFrameWorkLib.GrilleEntity", b =>
- {
- b.Property("GrilleId")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("MaxChain")
- .HasColumnType("INTEGER");
-
- b.Property("MaxZone")
- .HasColumnType("INTEGER");
-
- b.Property("NbChains")
- .HasColumnType("INTEGER");
-
- b.Property("NbZones")
- .HasColumnType("INTEGER");
-
- b.HasKey("GrilleId");
-
- b.ToTable("Grille");
- });
-
- modelBuilder.Entity("EntityFrameWorkLib.PlayerEntity", b =>
- {
- b.Property("PlayerId")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("MaxPoints")
- .HasColumnType("INTEGER");
-
- b.Property("MaxZone")
- .HasColumnType("INTEGER");
-
- b.Property("NbPlayed")
- .HasColumnType("INTEGER");
-
- b.Property("NbPoints")
- .HasColumnType("INTEGER");
-
- b.Property("NbWin")
- .HasColumnType("INTEGER");
-
- b.Property("Pseudo")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.HasKey("PlayerId");
-
- b.ToTable("Players");
- });
-
- modelBuilder.Entity("EntityFrameWorkLib.ScoreEntity", b =>
- {
- b.Property("ScoreId")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("GameId")
- .HasColumnType("INTEGER");
-
- b.Property("NbPoints")
- .HasColumnType("INTEGER");
-
- b.Property("PlayerId")
- .HasColumnType("INTEGER");
-
- b.HasKey("ScoreId");
-
- b.HasIndex("GameId");
-
- b.HasIndex("PlayerId");
-
- b.ToTable("Score");
- });
-
- modelBuilder.Entity("EntityFrameWorkLib.TurnEntity", b =>
- {
- b.Property("TurnId")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("DiceValue1")
- .HasColumnType("INTEGER");
-
- b.Property("DiceValue2")
- .HasColumnType("INTEGER");
-
- b.HasKey("TurnId");
-
- b.ToTable("Turn");
- });
-
- modelBuilder.Entity("EntityFrameWorkLib.ScoreEntity", b =>
- {
- b.HasOne("EntityFrameWorkLib.GameEntity", "Game")
- .WithMany()
- .HasForeignKey("GameId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("EntityFrameWorkLib.PlayerEntity", "Player")
- .WithMany()
- .HasForeignKey("PlayerId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Game");
-
- b.Navigation("Player");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/Sources/Tests/DbConsole/Migrations/20230320170448_AllMigrations.cs b/Sources/Tests/DbConsole/Migrations/20230320170448_AllMigrations.cs
deleted file mode 100644
index 96b4dd1..0000000
--- a/Sources/Tests/DbConsole/Migrations/20230320170448_AllMigrations.cs
+++ /dev/null
@@ -1,151 +0,0 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace DbConsole.Migrations
-{
- ///
- public partial class AllMigrations : Migration
- {
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "Case",
- columns: table => new
- {
- CaseId = table.Column(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- Value = table.Column(type: "INTEGER", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Case", x => x.CaseId);
- });
-
- migrationBuilder.CreateTable(
- name: "Game",
- columns: table => new
- {
- GameId = table.Column(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- Duration = table.Column(type: "TEXT", nullable: false),
- Date = table.Column(type: "TEXT", nullable: false),
- NbPlayers = table.Column(type: "INTEGER", nullable: false),
- Name = table.Column(type: "TEXT", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Game", x => x.GameId);
- });
-
- migrationBuilder.CreateTable(
- name: "Grille",
- columns: table => new
- {
- GrilleId = table.Column(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- NbChains = table.Column(type: "INTEGER", nullable: false),
- NbZones = table.Column(type: "INTEGER", nullable: false),
- MaxChain = table.Column(type: "INTEGER", nullable: false),
- MaxZone = table.Column(type: "INTEGER", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Grille", x => x.GrilleId);
- });
-
- migrationBuilder.CreateTable(
- name: "Players",
- columns: table => new
- {
- PlayerId = table.Column(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- Pseudo = table.Column(type: "TEXT", nullable: false),
- NbWin = table.Column(type: "INTEGER", nullable: false),
- NbPlayed = table.Column(type: "INTEGER", nullable: false),
- MaxZone = table.Column(type: "INTEGER", nullable: false),
- MaxPoints = table.Column(type: "INTEGER", nullable: false),
- NbPoints = table.Column(type: "INTEGER", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Players", x => x.PlayerId);
- });
-
- migrationBuilder.CreateTable(
- name: "Turn",
- columns: table => new
- {
- TurnId = table.Column(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- DiceValue1 = table.Column(type: "INTEGER", nullable: false),
- DiceValue2 = table.Column(type: "INTEGER", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Turn", x => x.TurnId);
- });
-
- migrationBuilder.CreateTable(
- name: "Score",
- columns: table => new
- {
- ScoreId = table.Column(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- NbPoints = table.Column(type: "INTEGER", nullable: false),
- GameId = table.Column(type: "INTEGER", nullable: false),
- PlayerId = table.Column(type: "INTEGER", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Score", x => x.ScoreId);
- table.ForeignKey(
- name: "FK_Score_Game_GameId",
- column: x => x.GameId,
- principalTable: "Game",
- principalColumn: "GameId",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_Score_Players_PlayerId",
- column: x => x.PlayerId,
- principalTable: "Players",
- principalColumn: "PlayerId",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateIndex(
- name: "IX_Score_GameId",
- table: "Score",
- column: "GameId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Score_PlayerId",
- table: "Score",
- column: "PlayerId");
- }
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "Case");
-
- migrationBuilder.DropTable(
- name: "Grille");
-
- migrationBuilder.DropTable(
- name: "Score");
-
- migrationBuilder.DropTable(
- name: "Turn");
-
- migrationBuilder.DropTable(
- name: "Game");
-
- migrationBuilder.DropTable(
- name: "Players");
- }
- }
-}
diff --git a/Sources/Tests/DbConsole/Migrations/SQLiteContextModelSnapshot.cs b/Sources/Tests/DbConsole/Migrations/SQLiteContextModelSnapshot.cs
deleted file mode 100644
index 2ee2875..0000000
--- a/Sources/Tests/DbConsole/Migrations/SQLiteContextModelSnapshot.cs
+++ /dev/null
@@ -1,172 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace DbConsole.Migrations
-{
- [DbContext(typeof(SQLiteContext))]
- partial class SQLiteContextModelSnapshot : ModelSnapshot
- {
- protected override void BuildModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
-
- modelBuilder.Entity("EntityFrameWorkLib.CaseEntity", b =>
- {
- b.Property("CaseId")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("Value")
- .HasColumnType("INTEGER");
-
- b.HasKey("CaseId");
-
- b.ToTable("Case");
- });
-
- modelBuilder.Entity("EntityFrameWorkLib.GameEntity", b =>
- {
- b.Property("GameId")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("Date")
- .HasColumnType("TEXT");
-
- b.Property("Duration")
- .HasColumnType("TEXT");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("NbPlayers")
- .HasColumnType("INTEGER");
-
- b.HasKey("GameId");
-
- b.ToTable("Game");
- });
-
- modelBuilder.Entity("EntityFrameWorkLib.GrilleEntity", b =>
- {
- b.Property("GrilleId")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("MaxChain")
- .HasColumnType("INTEGER");
-
- b.Property("MaxZone")
- .HasColumnType("INTEGER");
-
- b.Property("NbChains")
- .HasColumnType("INTEGER");
-
- b.Property("NbZones")
- .HasColumnType("INTEGER");
-
- b.HasKey("GrilleId");
-
- b.ToTable("Grille");
- });
-
- modelBuilder.Entity("EntityFrameWorkLib.PlayerEntity", b =>
- {
- b.Property("PlayerId")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("MaxPoints")
- .HasColumnType("INTEGER");
-
- b.Property("MaxZone")
- .HasColumnType("INTEGER");
-
- b.Property("NbPlayed")
- .HasColumnType("INTEGER");
-
- b.Property("NbPoints")
- .HasColumnType("INTEGER");
-
- b.Property("NbWin")
- .HasColumnType("INTEGER");
-
- b.Property("Pseudo")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.HasKey("PlayerId");
-
- b.ToTable("Players");
- });
-
- modelBuilder.Entity("EntityFrameWorkLib.ScoreEntity", b =>
- {
- b.Property("ScoreId")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("GameId")
- .HasColumnType("INTEGER");
-
- b.Property("NbPoints")
- .HasColumnType("INTEGER");
-
- b.Property("PlayerId")
- .HasColumnType("INTEGER");
-
- b.HasKey("ScoreId");
-
- b.HasIndex("GameId");
-
- b.HasIndex("PlayerId");
-
- b.ToTable("Score");
- });
-
- modelBuilder.Entity("EntityFrameWorkLib.TurnEntity", b =>
- {
- b.Property("TurnId")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("DiceValue1")
- .HasColumnType("INTEGER");
-
- b.Property("DiceValue2")
- .HasColumnType("INTEGER");
-
- b.HasKey("TurnId");
-
- b.ToTable("Turn");
- });
-
- modelBuilder.Entity("EntityFrameWorkLib.ScoreEntity", b =>
- {
- b.HasOne("EntityFrameWorkLib.GameEntity", "Game")
- .WithMany()
- .HasForeignKey("GameId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("EntityFrameWorkLib.PlayerEntity", "Player")
- .WithMany()
- .HasForeignKey("PlayerId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Game");
-
- b.Navigation("Player");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/Sources/Tests/DbConsole/Program.cs b/Sources/Tests/DbConsole/Program.cs
index cd00908..0b4c5db 100644
--- a/Sources/Tests/DbConsole/Program.cs
+++ b/Sources/Tests/DbConsole/Program.cs
@@ -1,32 +1,21 @@
using EntityFrameWorkLib;
using Microsoft.EntityFrameworkCore;
+using Model;
-PlayerEntity p1 = new PlayerEntity
-{
- PlayerId = 0,
- Pseudo = "Jax",
- NbWin = 0,
- NbPlayed = 0,
- MaxZone = 0,
- MaxPoints = 0,
- NbPoints = 0
-};
-
-GameEntity g1 = new GameEntity
+/*GameEntity g1 = new GameEntity
{
GameId = 1,
-};
+};*/
-PlayerEntity p2 = new PlayerEntity
+/*PlayerEntity p1 = new PlayerEntity
{
- PlayerId = 0,
- Pseudo = "Theo",
+ PlayerId = 1,
+ Pseudo = "Jax",
NbWin = 0,
NbPlayed = 0,
MaxZone = 0,
MaxPoints = 0,
- NbPoints = 0
-};
+};*/
/*using (var context = new SQLiteContext())
{
@@ -38,14 +27,35 @@ PlayerEntity p2 = new PlayerEntity
using (var context = new SQLiteContext())
{
- var newScore = new ScoreEntity
+ var firstGame = new GameEntity
{
GameId = 1,
+ Name = "First Game",
+ };
+ var secondGame = new GameEntity
+ {
+ GameId = 2,
+ Name = "Second Game",
+ };
+ var thirdGame = new GameEntity
+ {
+ GameId = 3,
+ Name = "Third Game",
+ };
+ var newPlayer = new PlayerEntity
+ {
PlayerId = 2,
- NbPoints = 5
+ Pseudo = "Jax"
};
-
- context.Add(newScore);
+ var scores = new List
+ {
+ new ScoreEntity { GameId = 1, NbPointsTotal = 5 },
+ new ScoreEntity { GameId = 2, NbPointsTotal = 10 },
+ new ScoreEntity { GameId = 3, NbPointsTotal = 15 }
+ };
+ newPlayer.Scores = scores;
+ context.AddRange(firstGame, secondGame, thirdGame, newPlayer);
+ context.AddRange(scores);
context.SaveChanges();
}
diff --git a/Sources/Tests/DbConsole/projet.ToutesTables.db b/Sources/Tests/DbConsole/projet.ToutesTables.db
deleted file mode 100644
index 4c892c4..0000000
Binary files a/Sources/Tests/DbConsole/projet.ToutesTables.db and /dev/null differ
diff --git a/Sources/Tests/DbConsole/projet.ToutesTables.db-wal b/Sources/Tests/DbConsole/projet.ToutesTables.db-wal
deleted file mode 100644
index e69de29..0000000
diff --git a/Sources/Trek12_API.sln b/Sources/Trek12_API.sln
index c682d4f..cbfc507 100644
--- a/Sources/Trek12_API.sln
+++ b/Sources/Trek12_API.sln
@@ -13,15 +13,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityFrameWorkLib", "Trek1
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DbConsole", "Tests\DbConsole\DbConsole.csproj", "{75B303CC-F36E-46FA-BE23-05EEA35D9B28}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModelTest", "Tests\ModelTest\ModelTest.csproj", "{6EC6383D-10E8-44E1-8EDD-EF4DF460A9B1}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ModelTest", "Tests\ModelTest\ModelTest.csproj", "{6EC6383D-10E8-44E1-8EDD-EF4DF460A9B1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Stub", "Stub", "{B1585816-FCBB-484F-A1AA-C7AEB501C39B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stub", "Stub\Stub\Stub.csproj", "{5E45E953-4FCC-42B6-9F22-15108D002D78}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stub", "Stub\Stub\Stub.csproj", "{5E45E953-4FCC-42B6-9F22-15108D002D78}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared", "Shared\Shared.csproj", "{8B6EC777-57F8-4509-9163-4312A40FE63C}"
-EndProject
-Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{7DF17583-2166-4ABE-82EE-F63CEE2132C2}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shared", "Shared\Shared.csproj", "{8B6EC777-57F8-4509-9163-4312A40FE63C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -57,10 +55,6 @@ Global
{8B6EC777-57F8-4509-9163-4312A40FE63C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8B6EC777-57F8-4509-9163-4312A40FE63C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8B6EC777-57F8-4509-9163-4312A40FE63C}.Release|Any CPU.Build.0 = Release|Any CPU
- {7DF17583-2166-4ABE-82EE-F63CEE2132C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7DF17583-2166-4ABE-82EE-F63CEE2132C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7DF17583-2166-4ABE-82EE-F63CEE2132C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7DF17583-2166-4ABE-82EE-F63CEE2132C2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Sources/Trek12_Lib/GameEntity.cs b/Sources/Trek12_Lib/GameEntity.cs
index 3648488..2540edf 100644
--- a/Sources/Trek12_Lib/GameEntity.cs
+++ b/Sources/Trek12_Lib/GameEntity.cs
@@ -17,6 +17,7 @@ namespace EntityFrameWorkLib
public DateOnly Date { get; set; }
public int NbPlayers { get; set; }
public string Name { get; set; }
- //public ICollection NbPoints { get; set; }
+
+ public List Scores { get; set; }
}
}
diff --git a/Sources/Trek12_Lib/PlayerEntity.cs b/Sources/Trek12_Lib/PlayerEntity.cs
index 516ca91..df457dd 100644
--- a/Sources/Trek12_Lib/PlayerEntity.cs
+++ b/Sources/Trek12_Lib/PlayerEntity.cs
@@ -14,7 +14,7 @@ namespace EntityFrameWorkLib
public int NbPlayed { get; set; }
public int MaxZone { get; set; }
public int MaxPoints { get; set; }
- public int NbPoints { get; set; }
+ public List Scores { get; set; }
}
}
diff --git a/Sources/Trek12_Lib/ScoreEntity.cs b/Sources/Trek12_Lib/ScoreEntity.cs
index 6e81feb..5fdd3be 100644
--- a/Sources/Trek12_Lib/ScoreEntity.cs
+++ b/Sources/Trek12_Lib/ScoreEntity.cs
@@ -13,7 +13,7 @@ namespace EntityFrameWorkLib
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int ScoreId { get; set; }
- public int NbPoints { get; set; }
+ public int NbPointsTotal { get; set; }
public int GameId { get; set; }
[ForeignKey("GameId")]
diff --git a/Sources/Trek12_Lib/TrekContext.cs b/Sources/Trek12_Lib/TrekContext.cs
index 87d1a91..d4f79bb 100644
--- a/Sources/Trek12_Lib/TrekContext.cs
+++ b/Sources/Trek12_Lib/TrekContext.cs
@@ -55,6 +55,26 @@ namespace EntityFrameWorkLib
modelBuilder.Entity().Property(n => n.TurnId).ValueGeneratedOnAdd();
modelBuilder.Entity().Property(n => n.ScoreId).ValueGeneratedOnAdd();
+ //Configuration des clés primaires et étrangères pour la table Score
+ modelBuilder.Entity()
+ .HasKey(s => s.ScoreId);
+
+ modelBuilder.Entity()
+ .HasKey(g => g.GameId);
+
+ modelBuilder.Entity()
+ .HasKey(p => p.PlayerId);
+
+ modelBuilder.Entity()
+ .HasOne(s => s.Game)
+ .WithMany(g => g.Scores)
+ .HasForeignKey(s => s.GameId);
+
+ modelBuilder.Entity()
+ .HasOne(s => s.Player)
+ .WithMany(p => p.Scores)
+ .HasForeignKey(s => s.PlayerId);
+
base.OnModelCreating(modelBuilder);
}
}
diff --git a/docker-compose/.dockerignore b/docker-compose/.dockerignore
new file mode 100644
index 0000000..3729ff0
--- /dev/null
+++ b/docker-compose/.dockerignore
@@ -0,0 +1,25 @@
+**/.classpath
+**/.dockerignore
+**/.env
+**/.git
+**/.gitignore
+**/.project
+**/.settings
+**/.toolstarget
+**/.vs
+**/.vscode
+**/*.*proj.user
+**/*.dbmdl
+**/*.jfm
+**/azds.yaml
+**/bin
+**/charts
+**/docker-compose*
+**/Dockerfile*
+**/node_modules
+**/npm-debug.log
+**/obj
+**/secrets.dev.yaml
+**/values.dev.yaml
+LICENSE
+README.md
\ No newline at end of file
diff --git a/docker-compose/docker-compose.dcproj b/docker-compose/docker-compose.dcproj
new file mode 100644
index 0000000..b4a2717
--- /dev/null
+++ b/docker-compose/docker-compose.dcproj
@@ -0,0 +1,18 @@
+
+
+
+ 2.1
+ Linux
+ {7DF17583-2166-4ABE-82EE-F63CEE2132C2}
+ True
+ {Scheme}://localhost:{ServicePort}/swagger
+ trek12_api
+
+
+
+ docker-compose.yml
+
+
+
+
+
diff --git a/docker-compose/docker-compose.override.yml b/docker-compose/docker-compose.override.yml
new file mode 100644
index 0000000..809d14e
--- /dev/null
+++ b/docker-compose/docker-compose.override.yml
@@ -0,0 +1,13 @@
+version: '3.4'
+
+services:
+ trek12_api:
+ environment:
+ - ASPNETCORE_ENVIRONMENT=Development
+ - ASPNETCORE_URLS=https://+:443;http://+:80
+ ports:
+ - "80"
+ - "443"
+ volumes:
+ - ~/.aspnet/https:/root/.aspnet/https:ro
+ - ~/.microsoft/usersecrets:/root/.microsoft/usersecrets:ro
\ No newline at end of file
diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml
new file mode 100644
index 0000000..2952ce3
--- /dev/null
+++ b/docker-compose/docker-compose.yml
@@ -0,0 +1,8 @@
+version: '3.4'
+
+services:
+ trek12_api:
+ image: ${DOCKER_REGISTRY-}trek12api
+ build:
+ context: .
+ dockerfile: Trek12_API/Dockerfile