From 01783aae1f9c7d5ac2c87371414ed02f7c5d7414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Chevaldonn=C3=A9?= Date: Mon, 23 Dec 2019 11:32:36 +0100 Subject: [PATCH] modified Many to Many samples in Fluent API --- Exemples.sln | 46 ++++++++-------- ...ex_042_001_EF_CodeFirst_conventions.csproj | 3 -- .../DbEntities/LitEx.cs | 37 ++++++++++++- .../DbEntities/NounoursDbEntities.cs | 13 +++-- .../DbEntities/NounoursEx.cs | 54 ++++++++++++++++++- ex_042_012_EF_CF_Dictionary/Model/Lit.cs | 10 ++-- ex_042_012_EF_CF_Dictionary/Model/Nounours.cs | 2 +- .../DbEntities/AlbumArtiste.cs | 0 .../DbEntities/AlbumArtisteDBEntities.cs | 0 .../DbEntities/AlbumEF.cs | 0 .../DbEntities/ArtisteEF.cs | 0 .../DbEntities/DbContextInitializer.cs | 0 .../Model/Album.cs | 0 .../Model/Artiste.cs | 0 .../Model/IAlbum.cs | 0 .../Model/IArtiste.cs | 0 .../Program.cs | 0 ...42_011_EF_CF_Many_to_Many_FluentAPI.csproj | 0 18 files changed, 125 insertions(+), 40 deletions(-) rename {ex_042_011_EF_CF_Many_to_Many_FluentAPI => ex_042_012_EF_CF_Many_to_Many_procurators}/DbEntities/AlbumArtiste.cs (100%) rename {ex_042_011_EF_CF_Many_to_Many_FluentAPI => ex_042_012_EF_CF_Many_to_Many_procurators}/DbEntities/AlbumArtisteDBEntities.cs (100%) rename {ex_042_011_EF_CF_Many_to_Many_FluentAPI => ex_042_012_EF_CF_Many_to_Many_procurators}/DbEntities/AlbumEF.cs (100%) rename {ex_042_011_EF_CF_Many_to_Many_FluentAPI => ex_042_012_EF_CF_Many_to_Many_procurators}/DbEntities/ArtisteEF.cs (100%) rename {ex_042_011_EF_CF_Many_to_Many_FluentAPI => ex_042_012_EF_CF_Many_to_Many_procurators}/DbEntities/DbContextInitializer.cs (100%) rename {ex_042_011_EF_CF_Many_to_Many_FluentAPI => ex_042_012_EF_CF_Many_to_Many_procurators}/Model/Album.cs (100%) rename {ex_042_011_EF_CF_Many_to_Many_FluentAPI => ex_042_012_EF_CF_Many_to_Many_procurators}/Model/Artiste.cs (100%) rename {ex_042_011_EF_CF_Many_to_Many_FluentAPI => ex_042_012_EF_CF_Many_to_Many_procurators}/Model/IAlbum.cs (100%) rename {ex_042_011_EF_CF_Many_to_Many_FluentAPI => ex_042_012_EF_CF_Many_to_Many_procurators}/Model/IArtiste.cs (100%) rename {ex_042_011_EF_CF_Many_to_Many_FluentAPI => ex_042_012_EF_CF_Many_to_Many_procurators}/Program.cs (100%) rename {ex_042_011_EF_CF_Many_to_Many_FluentAPI => ex_042_012_EF_CF_Many_to_Many_procurators}/ex_042_011_EF_CF_Many_to_Many_FluentAPI.csproj (100%) diff --git a/Exemples.sln b/Exemples.sln index b885f7d..49ecd1f 100644 --- a/Exemples.sln +++ b/Exemples.sln @@ -430,8 +430,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ex_042_009_EF_CF_One_to_Man EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ex_042_010_EF_CF_Many_to_Many", "ex_042_010_EF_CF_Many_to_Many\ex_042_010_EF_CF_Many_to_Many.csproj", "{C6EF99F3-959D-4096-8ABE-140596DD14BD}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ex_042_011_EF_CF_Many_to_Many_FluentAPI", "ex_042_011_EF_CF_Many_to_Many_FluentAPI\ex_042_011_EF_CF_Many_to_Many_FluentAPI.csproj", "{A1253EB6-0464-4989-9991-60EC0E380750}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ex_042_012_EF_CF_Dictionary", "ex_042_012_EF_CF_Dictionary\ex_042_012_EF_CF_Dictionary.csproj", "{D9BE7F40-ADCE-415B-AF36-8D9B40B6DB7F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ex_042_013_EF_CF_TPT_Inheritance", "ex_042_013_EF_CF_TPT_Inheritance\ex_042_013_EF_CF_TPT_Inheritance.csproj", "{504AB98B-3C2D-493B-BA70-6D67734732D5}" @@ -531,6 +529,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ex_050_010_Threading_en_UWP EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ex_052_006_problématique_6_UWP", "ex_052_006_problématique_6_UWP\ex_052_006_problématique_6_UWP.csproj", "{BCE167F6-6323-46FC-A112-D9941A75815A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ex_042_011_EF_CF_Many_to_Many_FluentAPI", "ex_042_011_EF_CF_Many_to_Many_FluentAPI\ex_042_011_EF_CF_Many_to_Many_FluentAPI.csproj", "{4F8FDCA9-D98C-4137-BD14-C255506209B0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -3637,26 +3637,6 @@ Global {C6EF99F3-959D-4096-8ABE-140596DD14BD}.Release|x64.Build.0 = Release|Any CPU {C6EF99F3-959D-4096-8ABE-140596DD14BD}.Release|x86.ActiveCfg = Release|Any CPU {C6EF99F3-959D-4096-8ABE-140596DD14BD}.Release|x86.Build.0 = Release|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Debug|ARM.ActiveCfg = Debug|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Debug|ARM.Build.0 = Debug|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Debug|ARM64.Build.0 = Debug|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Debug|x64.ActiveCfg = Debug|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Debug|x64.Build.0 = Debug|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Debug|x86.ActiveCfg = Debug|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Debug|x86.Build.0 = Debug|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Release|Any CPU.Build.0 = Release|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Release|ARM.ActiveCfg = Release|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Release|ARM.Build.0 = Release|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Release|ARM64.ActiveCfg = Release|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Release|ARM64.Build.0 = Release|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Release|x64.ActiveCfg = Release|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Release|x64.Build.0 = Release|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Release|x86.ActiveCfg = Release|Any CPU - {A1253EB6-0464-4989-9991-60EC0E380750}.Release|x86.Build.0 = Release|Any CPU {D9BE7F40-ADCE-415B-AF36-8D9B40B6DB7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D9BE7F40-ADCE-415B-AF36-8D9B40B6DB7F}.Debug|Any CPU.Build.0 = Debug|Any CPU {D9BE7F40-ADCE-415B-AF36-8D9B40B6DB7F}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -4467,6 +4447,26 @@ Global {BCE167F6-6323-46FC-A112-D9941A75815A}.Release|x86.ActiveCfg = Release|x86 {BCE167F6-6323-46FC-A112-D9941A75815A}.Release|x86.Build.0 = Release|x86 {BCE167F6-6323-46FC-A112-D9941A75815A}.Release|x86.Deploy.0 = Release|x86 + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Debug|ARM.ActiveCfg = Debug|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Debug|ARM.Build.0 = Debug|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Debug|ARM64.Build.0 = Debug|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Debug|x64.ActiveCfg = Debug|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Debug|x64.Build.0 = Debug|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Debug|x86.ActiveCfg = Debug|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Debug|x86.Build.0 = Debug|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Release|Any CPU.Build.0 = Release|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Release|ARM.ActiveCfg = Release|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Release|ARM.Build.0 = Release|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Release|ARM64.ActiveCfg = Release|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Release|ARM64.Build.0 = Release|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Release|x64.ActiveCfg = Release|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Release|x64.Build.0 = Release|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Release|x86.ActiveCfg = Release|Any CPU + {4F8FDCA9-D98C-4137-BD14-C255506209B0}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -4674,7 +4674,6 @@ Global {91FD20B6-250C-437B-9FBE-DA4D2B87DE03} = {593200F9-6D14-43BC-9289-8BB75FAC6552} {2C53F069-6E87-4A36-8915-E0219EBA8BA7} = {593200F9-6D14-43BC-9289-8BB75FAC6552} {C6EF99F3-959D-4096-8ABE-140596DD14BD} = {593200F9-6D14-43BC-9289-8BB75FAC6552} - {A1253EB6-0464-4989-9991-60EC0E380750} = {593200F9-6D14-43BC-9289-8BB75FAC6552} {D9BE7F40-ADCE-415B-AF36-8D9B40B6DB7F} = {593200F9-6D14-43BC-9289-8BB75FAC6552} {504AB98B-3C2D-493B-BA70-6D67734732D5} = {663523E4-3B60-4534-876F-8BD77110E6D8} {C5E45E2A-FCA3-4DCB-9681-C0FDEA282A99} = {663523E4-3B60-4534-876F-8BD77110E6D8} @@ -4721,6 +4720,7 @@ Global {AAD4491F-7CF7-4581-8AF5-FBB0CEA6EA23} = {C4385771-4731-42DA-8889-2087828D5FCE} {0D922BCD-7C0F-43FF-A015-F547716B8284} = {BF2B43D0-95C2-402B-92C3-D2464C117A6E} {BCE167F6-6323-46FC-A112-D9941A75815A} = {7FDA2D7D-5385-485D-B8B5-60727583D6ED} + {4F8FDCA9-D98C-4137-BD14-C255506209B0} = {593200F9-6D14-43BC-9289-8BB75FAC6552} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {8D31C3AE-36FF-4667-A2A7-0E670245A59E} diff --git a/ex_042_001_EF_CodeFirst_conventions/ex_042_001_EF_CodeFirst_conventions.csproj b/ex_042_001_EF_CodeFirst_conventions/ex_042_001_EF_CodeFirst_conventions.csproj index 57bd018..514202f 100644 --- a/ex_042_001_EF_CodeFirst_conventions/ex_042_001_EF_CodeFirst_conventions.csproj +++ b/ex_042_001_EF_CodeFirst_conventions/ex_042_001_EF_CodeFirst_conventions.csproj @@ -11,9 +11,6 @@ - - All - diff --git a/ex_042_012_EF_CF_Dictionary/DbEntities/LitEx.cs b/ex_042_012_EF_CF_Dictionary/DbEntities/LitEx.cs index da401c4..9fff973 100644 --- a/ex_042_012_EF_CF_Dictionary/DbEntities/LitEx.cs +++ b/ex_042_012_EF_CF_Dictionary/DbEntities/LitEx.cs @@ -9,10 +9,13 @@ // // ======================================================================== +using ex_042_012_EF_CF_Dictionary.Model; using System; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; namespace ex_042_012_EF_CF_Dictionary { @@ -20,7 +23,7 @@ namespace ex_042_012_EF_CF_Dictionary /// espèce de procurateur qui enveloppe un Lit afin de permettre son lien avec Entity Framework malgré le dictionnaire /// [Table("Lits")] - public class LitEx + public class LitEx : ILit { /// /// l'objet Lit wrappé (n'est pas enregistré en base) @@ -62,9 +65,41 @@ namespace ex_042_012_EF_CF_Dictionary set; } = new List(); + ReadOnlyDictionary ILit.Scores => throw new NotImplementedException(); + + public int this[INounours nounours] + { + get + { + var score = Scores.SingleOrDefault(sc => sc.Key.UniqueId == nounours.UniqueId); + return score != null ? score.Value : 0; + } + set + { + var score = Scores.SingleOrDefault(sc => sc.Key.UniqueId == nounours.UniqueId); + if(score != null) + { + score.Value = value; + } + else + { + NounoursEx nEx = new NounoursEx(nounours); + Score newScore = new Score() + { + Key = nEx, + Value = value, + Lit = this + }; + Scores.Add(newScore); + } + } + } + public LitEx() { Lit = new Lit(); } + + private static INounoursEqualityComparer NounoursEqComparer { get; set; } = new INounoursEqualityComparer(); } } diff --git a/ex_042_012_EF_CF_Dictionary/DbEntities/NounoursDbEntities.cs b/ex_042_012_EF_CF_Dictionary/DbEntities/NounoursDbEntities.cs index c1b5b82..00665d8 100644 --- a/ex_042_012_EF_CF_Dictionary/DbEntities/NounoursDbEntities.cs +++ b/ex_042_012_EF_CF_Dictionary/DbEntities/NounoursDbEntities.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using JetBrains.Annotations; using System.Linq; using System.Diagnostics; +using ex_042_012_EF_CF_Dictionary.Model; namespace ex_042_012_EF_CF_Dictionary { @@ -69,12 +70,12 @@ namespace ex_042_012_EF_CF_Dictionary /// les lits rentrés en base /// les nounours rentrés en base /// true si la récupération est réussie, false sinon - public bool GetAll(out IEnumerable lits, out IEnumerable nounours) + public bool GetAll(out IEnumerable lits, out IEnumerable nounours) { try { // récupère la collection de NounoursEx contenus dans la base et les projette en collection de Nounours - nounours = NounoursSet.ToList().Select(nEx => nEx.Nounours); + nounours = NounoursSet.ToList();//.Select(nEx => nEx.Nounours); //récupère la collection de LitEx contenus dans la base et les projette en collection de Lit lits = LitsSet.ToList().Select(lEx => lEx.Lit); @@ -85,7 +86,7 @@ namespace ex_042_012_EF_CF_Dictionary //... trouve le lit concerné par ce score... Lit leLit = lits.Single(l => l.Propriétaire == score.Lit.Propriétaire); //...trouve le nounours concerné par ce score... - Nounours leNounours = nounours.Single(n => n.Equals(score.Key.Nounours)); + INounours leNounours = nounours.Single(n => n.Equals(score.Key)); //... met à jour le dictionnaire dans l'instance de Lit leLit[leNounours] = score.Value; } @@ -113,7 +114,7 @@ namespace ex_042_012_EF_CF_Dictionary public void AddAll(IEnumerable lesLits, IEnumerable lesNounours) { //projection des données dans les types NounoursEx, LitEx et Scores pour permettre d'utiliser EntityFramework pour l'insertion en base - lesNounoursEx = lesNounours.Select(n => new NounoursEx { Nounours = n }).ToArray(); + lesNounoursEx = lesNounours.Select(n => new NounoursEx(n)).ToArray(); lesLitsEx = lesLits.Select(l => new LitEx { Lit = l }).ToArray(); //met à jour la collection de scores @@ -130,6 +131,8 @@ namespace ex_042_012_EF_CF_Dictionary SaveChanges(); } + private INounoursEqualityComparer NounoursEqComparer { get; set; } = new INounoursEqualityComparer(); + /// /// transforme les dictionnaires en collection de scores /// @@ -138,7 +141,7 @@ namespace ex_042_012_EF_CF_Dictionary { foreach (var kvp in litEx.Lit.Scores) { - NounoursEx nounoursEx = lesNounoursEx.Single(nEx => nEx.Nounours == kvp.Key); + NounoursEx nounoursEx = lesNounoursEx.Single(nEx => NounoursEqComparer.Equals(nEx, kvp.Key)); Score score = new Score() { Key = nounoursEx, diff --git a/ex_042_012_EF_CF_Dictionary/DbEntities/NounoursEx.cs b/ex_042_012_EF_CF_Dictionary/DbEntities/NounoursEx.cs index dfb9969..985b387 100644 --- a/ex_042_012_EF_CF_Dictionary/DbEntities/NounoursEx.cs +++ b/ex_042_012_EF_CF_Dictionary/DbEntities/NounoursEx.cs @@ -20,13 +20,13 @@ namespace ex_042_012_EF_CF_Dictionary /// espèce de procurateur qui enveloppe un Nounours afin de permettre son lien avec Entity Framework malgré le dictionnaire /// [Table("Nounours")] - public class NounoursEx + public class NounoursEx : INounours, IEquatable { /// /// le Nounours wrappé (n'est pas enregistré en base) /// [NotMapped] - public Nounours Nounours + Nounours Nounours { get; set; } @@ -56,6 +56,11 @@ namespace ex_042_012_EF_CF_Dictionary Nounours = new Nounours(); } + public NounoursEx(INounours nounours) + { + Nounours = nounours as Nounours; + } + /// /// wrapper pour le nom du Nounours /// @@ -90,5 +95,50 @@ namespace ex_042_012_EF_CF_Dictionary { return $"{UniqueId}: {Nom} ({DateDeNaissance:dd/MM/yyyy}, {NbPoils} poils)"; } + + /// + /// returns a hash code in order to use this class in hash table + /// + /// hash code + public override int GetHashCode() + { + return Nounours.GetHashCode(); + } + + /// + /// checks if the "right" object is equal to this Nounours or not + /// + /// the other object to be compared with this Nounours + /// true if equals, false if not + public override bool Equals(object right) + { + //check null + if (object.ReferenceEquals(right, null)) + { + return false; + } + + if (object.ReferenceEquals(this, right)) + { + return true; + } + + if (this.GetType() != right.GetType()) + { + return false; + } + + return this.Equals(right as NounoursEx); + } + + /// + /// checks if this Nounours is equal to the other Nounours + /// + /// the other Nounours to be compared with + /// true if equals + public bool Equals(NounoursEx other) + { + return this.Nounours.Equals(other.Nounours); + } } } diff --git a/ex_042_012_EF_CF_Dictionary/Model/Lit.cs b/ex_042_012_EF_CF_Dictionary/Model/Lit.cs index 2fc1d1b..86449a1 100644 --- a/ex_042_012_EF_CF_Dictionary/Model/Lit.cs +++ b/ex_042_012_EF_CF_Dictionary/Model/Lit.cs @@ -15,7 +15,7 @@ using System.Collections.ObjectModel; namespace ex_042_012_EF_CF_Dictionary { - public class Lit + public class Lit : ILit { public Guid UniqueId { @@ -29,18 +29,18 @@ namespace ex_042_012_EF_CF_Dictionary public Lit() { - Scores = new ReadOnlyDictionary(mScores); + Scores = new ReadOnlyDictionary(mScores); } /// /// dictionnaire de Nounours (un score entier est associé à chaque nounours) /// - private Dictionary mScores { get; set; } = new Dictionary(); + private Dictionary mScores { get; set; } = new Dictionary(); /// /// permet d'accéder en lecture seule au dictionnaie de scores /// - public ReadOnlyDictionary Scores + public ReadOnlyDictionary Scores { get; private set; } @@ -50,7 +50,7 @@ namespace ex_042_012_EF_CF_Dictionary /// /// /// - public int this[Nounours nounours] + public int this[INounours nounours] { get { diff --git a/ex_042_012_EF_CF_Dictionary/Model/Nounours.cs b/ex_042_012_EF_CF_Dictionary/Model/Nounours.cs index 4a2547b..6297c6f 100644 --- a/ex_042_012_EF_CF_Dictionary/Model/Nounours.cs +++ b/ex_042_012_EF_CF_Dictionary/Model/Nounours.cs @@ -16,7 +16,7 @@ namespace ex_042_012_EF_CF_Dictionary /// /// Nounours est une classe POCO, i.e. Plain Old CLR Object. /// - public class Nounours + public class Nounours : INounours { public Guid UniqueId { diff --git a/ex_042_011_EF_CF_Many_to_Many_FluentAPI/DbEntities/AlbumArtiste.cs b/ex_042_012_EF_CF_Many_to_Many_procurators/DbEntities/AlbumArtiste.cs similarity index 100% rename from ex_042_011_EF_CF_Many_to_Many_FluentAPI/DbEntities/AlbumArtiste.cs rename to ex_042_012_EF_CF_Many_to_Many_procurators/DbEntities/AlbumArtiste.cs diff --git a/ex_042_011_EF_CF_Many_to_Many_FluentAPI/DbEntities/AlbumArtisteDBEntities.cs b/ex_042_012_EF_CF_Many_to_Many_procurators/DbEntities/AlbumArtisteDBEntities.cs similarity index 100% rename from ex_042_011_EF_CF_Many_to_Many_FluentAPI/DbEntities/AlbumArtisteDBEntities.cs rename to ex_042_012_EF_CF_Many_to_Many_procurators/DbEntities/AlbumArtisteDBEntities.cs diff --git a/ex_042_011_EF_CF_Many_to_Many_FluentAPI/DbEntities/AlbumEF.cs b/ex_042_012_EF_CF_Many_to_Many_procurators/DbEntities/AlbumEF.cs similarity index 100% rename from ex_042_011_EF_CF_Many_to_Many_FluentAPI/DbEntities/AlbumEF.cs rename to ex_042_012_EF_CF_Many_to_Many_procurators/DbEntities/AlbumEF.cs diff --git a/ex_042_011_EF_CF_Many_to_Many_FluentAPI/DbEntities/ArtisteEF.cs b/ex_042_012_EF_CF_Many_to_Many_procurators/DbEntities/ArtisteEF.cs similarity index 100% rename from ex_042_011_EF_CF_Many_to_Many_FluentAPI/DbEntities/ArtisteEF.cs rename to ex_042_012_EF_CF_Many_to_Many_procurators/DbEntities/ArtisteEF.cs diff --git a/ex_042_011_EF_CF_Many_to_Many_FluentAPI/DbEntities/DbContextInitializer.cs b/ex_042_012_EF_CF_Many_to_Many_procurators/DbEntities/DbContextInitializer.cs similarity index 100% rename from ex_042_011_EF_CF_Many_to_Many_FluentAPI/DbEntities/DbContextInitializer.cs rename to ex_042_012_EF_CF_Many_to_Many_procurators/DbEntities/DbContextInitializer.cs diff --git a/ex_042_011_EF_CF_Many_to_Many_FluentAPI/Model/Album.cs b/ex_042_012_EF_CF_Many_to_Many_procurators/Model/Album.cs similarity index 100% rename from ex_042_011_EF_CF_Many_to_Many_FluentAPI/Model/Album.cs rename to ex_042_012_EF_CF_Many_to_Many_procurators/Model/Album.cs diff --git a/ex_042_011_EF_CF_Many_to_Many_FluentAPI/Model/Artiste.cs b/ex_042_012_EF_CF_Many_to_Many_procurators/Model/Artiste.cs similarity index 100% rename from ex_042_011_EF_CF_Many_to_Many_FluentAPI/Model/Artiste.cs rename to ex_042_012_EF_CF_Many_to_Many_procurators/Model/Artiste.cs diff --git a/ex_042_011_EF_CF_Many_to_Many_FluentAPI/Model/IAlbum.cs b/ex_042_012_EF_CF_Many_to_Many_procurators/Model/IAlbum.cs similarity index 100% rename from ex_042_011_EF_CF_Many_to_Many_FluentAPI/Model/IAlbum.cs rename to ex_042_012_EF_CF_Many_to_Many_procurators/Model/IAlbum.cs diff --git a/ex_042_011_EF_CF_Many_to_Many_FluentAPI/Model/IArtiste.cs b/ex_042_012_EF_CF_Many_to_Many_procurators/Model/IArtiste.cs similarity index 100% rename from ex_042_011_EF_CF_Many_to_Many_FluentAPI/Model/IArtiste.cs rename to ex_042_012_EF_CF_Many_to_Many_procurators/Model/IArtiste.cs diff --git a/ex_042_011_EF_CF_Many_to_Many_FluentAPI/Program.cs b/ex_042_012_EF_CF_Many_to_Many_procurators/Program.cs similarity index 100% rename from ex_042_011_EF_CF_Many_to_Many_FluentAPI/Program.cs rename to ex_042_012_EF_CF_Many_to_Many_procurators/Program.cs diff --git a/ex_042_011_EF_CF_Many_to_Many_FluentAPI/ex_042_011_EF_CF_Many_to_Many_FluentAPI.csproj b/ex_042_012_EF_CF_Many_to_Many_procurators/ex_042_011_EF_CF_Many_to_Many_FluentAPI.csproj similarity index 100% rename from ex_042_011_EF_CF_Many_to_Many_FluentAPI/ex_042_011_EF_CF_Many_to_Many_FluentAPI.csproj rename to ex_042_012_EF_CF_Many_to_Many_procurators/ex_042_011_EF_CF_Many_to_Many_FluentAPI.csproj