From 2e65a64fd274256cc334846a8be57d9669b7e271 Mon Sep 17 00:00:00 2001 From: victor perez ngounou Date: Sat, 15 Oct 2022 07:20:28 +0200 Subject: [PATCH 1/3] Architecture EntityFramework --- Sources/BowlingEF/BowlingEF.csproj | 9 +++++++++ Sources/BowlingMaping/BowlingMaping.csproj | 14 ++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 Sources/BowlingMaping/BowlingMaping.csproj diff --git a/Sources/BowlingEF/BowlingEF.csproj b/Sources/BowlingEF/BowlingEF.csproj index 132c02c..37aa1c1 100644 --- a/Sources/BowlingEF/BowlingEF.csproj +++ b/Sources/BowlingEF/BowlingEF.csproj @@ -6,4 +6,13 @@ enable + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + diff --git a/Sources/BowlingMaping/BowlingMaping.csproj b/Sources/BowlingMaping/BowlingMaping.csproj new file mode 100644 index 0000000..1f3a5a5 --- /dev/null +++ b/Sources/BowlingMaping/BowlingMaping.csproj @@ -0,0 +1,14 @@ + + + + net6.0 + enable + enable + + + + + + + + From 306c32035414fea13b244bc0e32404ffd63efaa5 Mon Sep 17 00:00:00 2001 From: victor perez ngounou Date: Sat, 15 Oct 2022 07:21:23 +0200 Subject: [PATCH 2/3] Implementation de Entity Framework #30 --- .gitignore | 2 + Sources/BowlingApp/BowlingApp.csproj | 8 + Sources/BowlingApp/bowling.db | Bin 0 -> 45056 bytes Sources/BowlingEF/Class1.cs | 7 - Sources/BowlingEF/Context/BowlingContext.cs | 24 +++ Sources/BowlingEF/Entities/EquipeEntity.cs | 6 +- Sources/BowlingEF/Entities/FrameEntity.cs | 27 ++++ Sources/BowlingEF/Entities/JoueurEntity.cs | 14 +- Sources/BowlingEF/Entities/PartieEntity.cs | 28 ++++ .../20221015045144_migration001.Designer.cs | 151 ++++++++++++++++++ .../Migrations/20221015045144_migration001.cs | 119 ++++++++++++++ .../Migrations/BowlingContextModelSnapshot.cs | 149 +++++++++++++++++ Sources/BowlingLib/Model/Equipe.cs | 1 + Sources/BowlingLib/Model/Frame.cs | 4 +- Sources/BowlingMaping/DbDataManager.cs | 38 +++++ Sources/Solution.sln | 10 +- 16 files changed, 574 insertions(+), 14 deletions(-) create mode 100644 Sources/BowlingApp/bowling.db delete mode 100644 Sources/BowlingEF/Class1.cs create mode 100644 Sources/BowlingEF/Context/BowlingContext.cs create mode 100644 Sources/BowlingEF/Entities/FrameEntity.cs create mode 100644 Sources/BowlingEF/Entities/PartieEntity.cs create mode 100644 Sources/BowlingEF/Migrations/20221015045144_migration001.Designer.cs create mode 100644 Sources/BowlingEF/Migrations/20221015045144_migration001.cs create mode 100644 Sources/BowlingEF/Migrations/BowlingContextModelSnapshot.cs create mode 100644 Sources/BowlingMaping/DbDataManager.cs diff --git a/.gitignore b/.gitignore index 54237a9..d767293 100644 --- a/.gitignore +++ b/.gitignore @@ -426,3 +426,5 @@ Network Trash Folder Temporary Items .apdisk +/Sources/BowlingApp/bowling.db-shm +/Sources/BowlingApp/bowling.db-wal diff --git a/Sources/BowlingApp/BowlingApp.csproj b/Sources/BowlingApp/BowlingApp.csproj index dbc61aa..949c03d 100644 --- a/Sources/BowlingApp/BowlingApp.csproj +++ b/Sources/BowlingApp/BowlingApp.csproj @@ -4,8 +4,16 @@ Exe net6.0 + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + diff --git a/Sources/BowlingApp/bowling.db b/Sources/BowlingApp/bowling.db new file mode 100644 index 0000000000000000000000000000000000000000..f519e253278e5d3cce49c5e2263c8e9ae6ce1021 GIT binary patch literal 45056 zcmeI)O;6)S7{GBmyaYm7TJ;biw3TJ`u+buv1hz=MY|}7oU4oM)*%e5wtdzJ_R3MA( zNZmsZ&`Le^gY?j2zetZgwcn!0j^l9>n*icS_*)5y?U{Kzzh}lU0nz%Z)(c$YyS{hU z35;#+eJzvGJ~IqW(=zh8BA@ZLB;U-(JMvYZcz@H|jJ8$(X?5*CEw|Lrp8U1;$CL8v zKkxm%a=QH6^5)W?@*o=m2q1s}0th^KfsJvn_T@-89C7PtM5c15X83H?QNaJ~!sXMsVIr@>W7cW@HCaXnvNY^qt=H7m22 z|7KU$hTnfwf;xksKiqew#&Jqh56{UTG{W_~wkn_c+TWUdupxi|0tg_000IagfB*sr zAb`Mw6Zlx4tFD)e<#MT5dQseYQQFyY&f*V3ipA0=Tg9zXF(><_ul=jZ2O9ziAb`>03K0JOU;fcQ8v+O*fB*srAb Joueurs { get; set; } + public DbSet Equipes { get; set; } + public DbSet Parties { get; set; } + public DbSet Frames { get; set; } + + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + optionsBuilder.UseSqlite("Data Source=bowling.db"); + } + + } +} diff --git a/Sources/BowlingEF/Entities/EquipeEntity.cs b/Sources/BowlingEF/Entities/EquipeEntity.cs index 44a6789..1854c3d 100644 --- a/Sources/BowlingEF/Entities/EquipeEntity.cs +++ b/Sources/BowlingEF/Entities/EquipeEntity.cs @@ -6,12 +6,14 @@ using System.Threading.Tasks; namespace BowlingEF.Entities { - //classe EquipeEntity représentant la table Equipe de la base de données + /// + /// Classe de gestion des equipes + /// public class EquipeEntity { public long Id { get; set; } public string Nom { get; set; } - public List Joueurs { get; set; } + public ICollection Joueurs { get; set; } public EquipeEntity() { Joueurs = new List(); diff --git a/Sources/BowlingEF/Entities/FrameEntity.cs b/Sources/BowlingEF/Entities/FrameEntity.cs new file mode 100644 index 0000000..2d45d46 --- /dev/null +++ b/Sources/BowlingEF/Entities/FrameEntity.cs @@ -0,0 +1,27 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace BowlingEF.Entities +{ + /// + /// Classe de gestion des frames + /// + public class FrameEntity + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long Id { get; set; } + [Required] + public int Numero { get; set; } + [Required] + public int Lancer1 { get; set; } + [Required] + public int Lancer2 { get; set; } + public int Lancer3 { get; set; } + [Required] + public bool IsStrike { get; set; } + [Required] + public bool IsSpare { get; set; } + public PartieEntity Partie { get; set; } + } +} \ No newline at end of file diff --git a/Sources/BowlingEF/Entities/JoueurEntity.cs b/Sources/BowlingEF/Entities/JoueurEntity.cs index 1fdffdc..fb12d5d 100644 --- a/Sources/BowlingEF/Entities/JoueurEntity.cs +++ b/Sources/BowlingEF/Entities/JoueurEntity.cs @@ -1,6 +1,18 @@ -namespace BowlingEF.Entities +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace BowlingEF.Entities { + /// + /// Classe de gestion des Joueurs + /// public class JoueurEntity { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long Id { get; set; } + + [Required] + public string Pseudo { get; set; } } } \ No newline at end of file diff --git a/Sources/BowlingEF/Entities/PartieEntity.cs b/Sources/BowlingEF/Entities/PartieEntity.cs new file mode 100644 index 0000000..4c7e4f1 --- /dev/null +++ b/Sources/BowlingEF/Entities/PartieEntity.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BowlingEF.Entities +{ + /// + /// Classe de gestion des parties + /// + public class PartieEntity + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long Id { get; set; } + public JoueurEntity Joueur { get; set; } + public ICollection Frames { get; set; } + public int Score { get; set; } + + public PartieEntity() + { + Frames = new List(); + } + } +} diff --git a/Sources/BowlingEF/Migrations/20221015045144_migration001.Designer.cs b/Sources/BowlingEF/Migrations/20221015045144_migration001.Designer.cs new file mode 100644 index 0000000..08517d8 --- /dev/null +++ b/Sources/BowlingEF/Migrations/20221015045144_migration001.Designer.cs @@ -0,0 +1,151 @@ +// +using System; +using BowlingEF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace BowlingEF.Migrations +{ + [DbContext(typeof(BowlingContext))] + [Migration("20221015045144_migration001")] + partial class migration001 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "6.0.10"); + + modelBuilder.Entity("BowlingEF.Entities.EquipeEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Nom") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("Equipes"); + }); + + modelBuilder.Entity("BowlingEF.Entities.FrameEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("IsSpare") + .HasColumnType("INTEGER"); + + b.Property("IsStrike") + .HasColumnType("INTEGER"); + + b.Property("Lancer1") + .HasColumnType("INTEGER"); + + b.Property("Lancer2") + .HasColumnType("INTEGER"); + + b.Property("Lancer3") + .HasColumnType("INTEGER"); + + b.Property("Numero") + .HasColumnType("INTEGER"); + + b.Property("PartieId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("PartieId"); + + b.ToTable("Frames"); + }); + + modelBuilder.Entity("BowlingEF.Entities.JoueurEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("EquipeEntityId") + .HasColumnType("INTEGER"); + + b.Property("Pseudo") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("EquipeEntityId"); + + b.ToTable("Joueurs"); + }); + + modelBuilder.Entity("BowlingEF.Entities.PartieEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("JoueurId") + .HasColumnType("INTEGER"); + + b.Property("Score") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("JoueurId"); + + b.ToTable("Parties"); + }); + + modelBuilder.Entity("BowlingEF.Entities.FrameEntity", b => + { + b.HasOne("BowlingEF.Entities.PartieEntity", "Partie") + .WithMany("Frames") + .HasForeignKey("PartieId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Partie"); + }); + + modelBuilder.Entity("BowlingEF.Entities.JoueurEntity", b => + { + b.HasOne("BowlingEF.Entities.EquipeEntity", null) + .WithMany("Joueurs") + .HasForeignKey("EquipeEntityId"); + }); + + modelBuilder.Entity("BowlingEF.Entities.PartieEntity", b => + { + b.HasOne("BowlingEF.Entities.JoueurEntity", "Joueur") + .WithMany() + .HasForeignKey("JoueurId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Joueur"); + }); + + modelBuilder.Entity("BowlingEF.Entities.EquipeEntity", b => + { + b.Navigation("Joueurs"); + }); + + modelBuilder.Entity("BowlingEF.Entities.PartieEntity", b => + { + b.Navigation("Frames"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Sources/BowlingEF/Migrations/20221015045144_migration001.cs b/Sources/BowlingEF/Migrations/20221015045144_migration001.cs new file mode 100644 index 0000000..069c863 --- /dev/null +++ b/Sources/BowlingEF/Migrations/20221015045144_migration001.cs @@ -0,0 +1,119 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace BowlingEF.Migrations +{ + public partial class migration001 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Equipes", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Nom = table.Column(type: "TEXT", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Equipes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Joueurs", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Pseudo = table.Column(type: "TEXT", nullable: false), + EquipeEntityId = table.Column(type: "INTEGER", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Joueurs", x => x.Id); + table.ForeignKey( + name: "FK_Joueurs_Equipes_EquipeEntityId", + column: x => x.EquipeEntityId, + principalTable: "Equipes", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "Parties", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + JoueurId = table.Column(type: "INTEGER", nullable: false), + Score = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Parties", x => x.Id); + table.ForeignKey( + name: "FK_Parties_Joueurs_JoueurId", + column: x => x.JoueurId, + principalTable: "Joueurs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Frames", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Numero = table.Column(type: "INTEGER", nullable: false), + Lancer1 = table.Column(type: "INTEGER", nullable: false), + Lancer2 = table.Column(type: "INTEGER", nullable: false), + Lancer3 = table.Column(type: "INTEGER", nullable: false), + IsStrike = table.Column(type: "INTEGER", nullable: false), + IsSpare = table.Column(type: "INTEGER", nullable: false), + PartieId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Frames", x => x.Id); + table.ForeignKey( + name: "FK_Frames_Parties_PartieId", + column: x => x.PartieId, + principalTable: "Parties", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_Frames_PartieId", + table: "Frames", + column: "PartieId"); + + migrationBuilder.CreateIndex( + name: "IX_Joueurs_EquipeEntityId", + table: "Joueurs", + column: "EquipeEntityId"); + + migrationBuilder.CreateIndex( + name: "IX_Parties_JoueurId", + table: "Parties", + column: "JoueurId"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Frames"); + + migrationBuilder.DropTable( + name: "Parties"); + + migrationBuilder.DropTable( + name: "Joueurs"); + + migrationBuilder.DropTable( + name: "Equipes"); + } + } +} diff --git a/Sources/BowlingEF/Migrations/BowlingContextModelSnapshot.cs b/Sources/BowlingEF/Migrations/BowlingContextModelSnapshot.cs new file mode 100644 index 0000000..701210b --- /dev/null +++ b/Sources/BowlingEF/Migrations/BowlingContextModelSnapshot.cs @@ -0,0 +1,149 @@ +// +using System; +using BowlingEF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace BowlingEF.Migrations +{ + [DbContext(typeof(BowlingContext))] + partial class BowlingContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "6.0.10"); + + modelBuilder.Entity("BowlingEF.Entities.EquipeEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Nom") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("Equipes"); + }); + + modelBuilder.Entity("BowlingEF.Entities.FrameEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("IsSpare") + .HasColumnType("INTEGER"); + + b.Property("IsStrike") + .HasColumnType("INTEGER"); + + b.Property("Lancer1") + .HasColumnType("INTEGER"); + + b.Property("Lancer2") + .HasColumnType("INTEGER"); + + b.Property("Lancer3") + .HasColumnType("INTEGER"); + + b.Property("Numero") + .HasColumnType("INTEGER"); + + b.Property("PartieId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("PartieId"); + + b.ToTable("Frames"); + }); + + modelBuilder.Entity("BowlingEF.Entities.JoueurEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("EquipeEntityId") + .HasColumnType("INTEGER"); + + b.Property("Pseudo") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("EquipeEntityId"); + + b.ToTable("Joueurs"); + }); + + modelBuilder.Entity("BowlingEF.Entities.PartieEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("JoueurId") + .HasColumnType("INTEGER"); + + b.Property("Score") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("JoueurId"); + + b.ToTable("Parties"); + }); + + modelBuilder.Entity("BowlingEF.Entities.FrameEntity", b => + { + b.HasOne("BowlingEF.Entities.PartieEntity", "Partie") + .WithMany("Frames") + .HasForeignKey("PartieId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Partie"); + }); + + modelBuilder.Entity("BowlingEF.Entities.JoueurEntity", b => + { + b.HasOne("BowlingEF.Entities.EquipeEntity", null) + .WithMany("Joueurs") + .HasForeignKey("EquipeEntityId"); + }); + + modelBuilder.Entity("BowlingEF.Entities.PartieEntity", b => + { + b.HasOne("BowlingEF.Entities.JoueurEntity", "Joueur") + .WithMany() + .HasForeignKey("JoueurId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Joueur"); + }); + + modelBuilder.Entity("BowlingEF.Entities.EquipeEntity", b => + { + b.Navigation("Joueurs"); + }); + + modelBuilder.Entity("BowlingEF.Entities.PartieEntity", b => + { + b.Navigation("Frames"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Sources/BowlingLib/Model/Equipe.cs b/Sources/BowlingLib/Model/Equipe.cs index 910212f..4bc907c 100644 --- a/Sources/BowlingLib/Model/Equipe.cs +++ b/Sources/BowlingLib/Model/Equipe.cs @@ -12,6 +12,7 @@ namespace BowlingLib.Model { private string nom; private readonly long id; + public List Joueurs = new List(); diff --git a/Sources/BowlingLib/Model/Frame.cs b/Sources/BowlingLib/Model/Frame.cs index 675ec3a..6e4d5e8 100644 --- a/Sources/BowlingLib/Model/Frame.cs +++ b/Sources/BowlingLib/Model/Frame.cs @@ -21,7 +21,7 @@ namespace BowlingLib.Model } private int numero; - private long id; + private readonly long id; public long Id { get { return id; } @@ -126,7 +126,7 @@ namespace BowlingLib.Model this.QuillesTombees = 0; } - public Frame(int numero, long id, int quillesRestantes, int quillesTombees, bool isStrike, bool isSpare, bool isPark, bool isFinished, Lancer lancer1, Lancer lancer2, Lancer lancer3) : this(numero) + public Frame(int numero, long id, int quillesRestantes, int quillesTombees, bool isStrike, bool isSpare, bool isPark, bool isFinished, Lancer lancer1, Lancer lancer2, Lancer? lancer3) : this(numero) { this.id = id; QuillesRestantes = quillesRestantes; diff --git a/Sources/BowlingMaping/DbDataManager.cs b/Sources/BowlingMaping/DbDataManager.cs new file mode 100644 index 0000000..a3641cd --- /dev/null +++ b/Sources/BowlingMaping/DbDataManager.cs @@ -0,0 +1,38 @@ +using BowlingEF.Context; +using Business; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BowlingMaping +{ + //public class DbDataManager : IDataManager + //{ + // private readonly BowlingContext context; + + // public DbDataManager(BowlingContext context) + // { + // this.context = context; + // } + + // public void Add(Manager data) + // { + // context.Add(data); + // context.SaveChanges(); + // } + + // public void Delete(Manager data) + // { + // context.Remove(data); + // context.SaveChanges(); + // } + + // public void Update(Manager data) + // { + // context.Update(data); + // context.SaveChanges(); + // } + //} +} diff --git a/Sources/Solution.sln b/Sources/Solution.sln index 52c5fe7..2cb5ded 100644 --- a/Sources/Solution.sln +++ b/Sources/Solution.sln @@ -13,9 +13,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BowlingAppUnitTest", "Tests EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BowlingStub", "BowlingStub\BowlingStub.csproj", "{B50615A5-ABFD-4A9C-B236-DBAEDE62AB2E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Business", "Business\Business.csproj", "{4F0C1B08-1DB7-4424-9521-EB13A858D09B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Business", "Business\Business.csproj", "{4F0C1B08-1DB7-4424-9521-EB13A858D09B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BowlingEF", "BowlingEF\BowlingEF.csproj", "{1E42224B-45E4-433C-9D20-0A61023790ED}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BowlingEF", "BowlingEF\BowlingEF.csproj", "{1E42224B-45E4-433C-9D20-0A61023790ED}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BowlingMaping", "BowlingMaping\BowlingMaping.csproj", "{874DDEF3-1FDA-4ECE-826F-F67143823544}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -47,6 +49,10 @@ Global {1E42224B-45E4-433C-9D20-0A61023790ED}.Debug|Any CPU.Build.0 = Debug|Any CPU {1E42224B-45E4-433C-9D20-0A61023790ED}.Release|Any CPU.ActiveCfg = Release|Any CPU {1E42224B-45E4-433C-9D20-0A61023790ED}.Release|Any CPU.Build.0 = Release|Any CPU + {874DDEF3-1FDA-4ECE-826F-F67143823544}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {874DDEF3-1FDA-4ECE-826F-F67143823544}.Debug|Any CPU.Build.0 = Debug|Any CPU + {874DDEF3-1FDA-4ECE-826F-F67143823544}.Release|Any CPU.ActiveCfg = Release|Any CPU + {874DDEF3-1FDA-4ECE-826F-F67143823544}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From b7f7c963540d832c2722d7bcb11e634a66cde76b Mon Sep 17 00:00:00 2001 From: victor perez ngounou Date: Sat, 15 Oct 2022 07:27:41 +0200 Subject: [PATCH 3/3] PatchBug --- Sources/BowlingLib/Model/Joueur.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/BowlingLib/Model/Joueur.cs b/Sources/BowlingLib/Model/Joueur.cs index a3b0a79..6f7ef91 100644 --- a/Sources/BowlingLib/Model/Joueur.cs +++ b/Sources/BowlingLib/Model/Joueur.cs @@ -48,7 +48,7 @@ namespace BowlingLib.Model public override int GetHashCode() { - return HashCode.Combine(pseudo, id, Id, Pseudo); + return HashCode.Combine(id, Id, Pseudo); } } }