From 88411bfc94a8ae2f89a28f53abd6528f69c917a4 Mon Sep 17 00:00:00 2001 From: Tom RAMBEAU Date: Fri, 26 Jan 2024 13:17:22 +0100 Subject: [PATCH 1/6] =?UTF-8?q?ajout=20du=20d=C3=A9but=20du=20projet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tp1/DbContextLib/DbContextLib.csproj | 9 ++++++ tp1/DbContextLib/LibraryContext.cs | 18 ++++++++++++ tp1/Entities/BookEntity.cs | 12 ++++++++ tp1/Entities/Entities.csproj | 9 ++++++ tp1/StubbedContextLib/StubbedContext.cs | 7 +++++ .../StubbedContextLib.csproj | 14 ++++++++++ tp1/TestStubEF/Class1.cs | 7 +++++ tp1/TestStubEF/TestStubEF.csproj | 9 ++++++ tp1/tp1.sln | 25 +++++++++++++++++ tp1/tp1/Program.cs | 2 ++ tp1/tp1/TestStubEF.csproj | 28 +++++++++++++++++++ 11 files changed, 140 insertions(+) create mode 100644 tp1/DbContextLib/DbContextLib.csproj create mode 100644 tp1/DbContextLib/LibraryContext.cs create mode 100644 tp1/Entities/BookEntity.cs create mode 100644 tp1/Entities/Entities.csproj create mode 100644 tp1/StubbedContextLib/StubbedContext.cs create mode 100644 tp1/StubbedContextLib/StubbedContextLib.csproj create mode 100644 tp1/TestStubEF/Class1.cs create mode 100644 tp1/TestStubEF/TestStubEF.csproj create mode 100644 tp1/tp1.sln create mode 100644 tp1/tp1/Program.cs create mode 100644 tp1/tp1/TestStubEF.csproj diff --git a/tp1/DbContextLib/DbContextLib.csproj b/tp1/DbContextLib/DbContextLib.csproj new file mode 100644 index 0000000..bb23fb7 --- /dev/null +++ b/tp1/DbContextLib/DbContextLib.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/tp1/DbContextLib/LibraryContext.cs b/tp1/DbContextLib/LibraryContext.cs new file mode 100644 index 0000000..d4b1ff8 --- /dev/null +++ b/tp1/DbContextLib/LibraryContext.cs @@ -0,0 +1,18 @@ +using Microsoft.EntityFrameworkCore; +using Entities; + +namespace DbContextLib +{ + public class LibraryContext: DbContext + { + public DbSet BookSet{ get; set; } + + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + optionsBuilder.UseSqlite($"Data Source=ex_03_02_CodeFirst_data_annotations.Books.db"); + } + } +} + + + diff --git a/tp1/Entities/BookEntity.cs b/tp1/Entities/BookEntity.cs new file mode 100644 index 0000000..50e79ff --- /dev/null +++ b/tp1/Entities/BookEntity.cs @@ -0,0 +1,12 @@ +using System.Reflection; + +namespace Entities +{ + public class BookEntity + { + public int ID {get; set;} + public string Title { get; set; } + public string Author { get; set; } + public string Isbn { get; set; } + } +} diff --git a/tp1/Entities/Entities.csproj b/tp1/Entities/Entities.csproj new file mode 100644 index 0000000..bb23fb7 --- /dev/null +++ b/tp1/Entities/Entities.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/tp1/StubbedContextLib/StubbedContext.cs b/tp1/StubbedContextLib/StubbedContext.cs new file mode 100644 index 0000000..65e6ff1 --- /dev/null +++ b/tp1/StubbedContextLib/StubbedContext.cs @@ -0,0 +1,7 @@ +namespace StubbedContextLib +{ + public class StubbedContext + { + + } +} diff --git a/tp1/StubbedContextLib/StubbedContextLib.csproj b/tp1/StubbedContextLib/StubbedContextLib.csproj new file mode 100644 index 0000000..cf7b1e0 --- /dev/null +++ b/tp1/StubbedContextLib/StubbedContextLib.csproj @@ -0,0 +1,14 @@ + + + + net8.0 + enable + enable + + + + + + + + diff --git a/tp1/TestStubEF/Class1.cs b/tp1/TestStubEF/Class1.cs new file mode 100644 index 0000000..7e68d8e --- /dev/null +++ b/tp1/TestStubEF/Class1.cs @@ -0,0 +1,7 @@ +namespace TestStubEF +{ + public class Class1 + { + + } +} diff --git a/tp1/TestStubEF/TestStubEF.csproj b/tp1/TestStubEF/TestStubEF.csproj new file mode 100644 index 0000000..bb23fb7 --- /dev/null +++ b/tp1/TestStubEF/TestStubEF.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/tp1/tp1.sln b/tp1/tp1.sln new file mode 100644 index 0000000..4524639 --- /dev/null +++ b/tp1/tp1.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34330.188 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tp1", "tp1\tp1.csproj", "{2097BC86-5063-42A3-83E2-1004732AC629}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2097BC86-5063-42A3-83E2-1004732AC629}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2097BC86-5063-42A3-83E2-1004732AC629}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2097BC86-5063-42A3-83E2-1004732AC629}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2097BC86-5063-42A3-83E2-1004732AC629}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B2A30B02-81D8-43E5-9D54-25E8F801F280} + EndGlobalSection +EndGlobal diff --git a/tp1/tp1/Program.cs b/tp1/tp1/Program.cs new file mode 100644 index 0000000..83fa4f4 --- /dev/null +++ b/tp1/tp1/Program.cs @@ -0,0 +1,2 @@ +// See https://aka.ms/new-console-template for more information +Console.WriteLine("Hello, World!"); diff --git a/tp1/tp1/TestStubEF.csproj b/tp1/tp1/TestStubEF.csproj new file mode 100644 index 0000000..c25f2d9 --- /dev/null +++ b/tp1/tp1/TestStubEF.csproj @@ -0,0 +1,28 @@ + + + + Exe + net8.0 + enable + enable + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + From 8443c6d8da8f90ab676188e70e67e160bdfbafed Mon Sep 17 00:00:00 2001 From: Tom RAMBEAU Date: Fri, 26 Jan 2024 13:26:07 +0100 Subject: [PATCH 2/6] modification de la classe --- tp1/DbContextLib/LibraryContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tp1/DbContextLib/LibraryContext.cs b/tp1/DbContextLib/LibraryContext.cs index d4b1ff8..2985321 100644 --- a/tp1/DbContextLib/LibraryContext.cs +++ b/tp1/DbContextLib/LibraryContext.cs @@ -9,7 +9,7 @@ namespace DbContextLib protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { - optionsBuilder.UseSqlite($"Data Source=ex_03_02_CodeFirst_data_annotations.Books.db"); + optionsBuilder.UseSqlite($"Data Source=data.Books.db"); } } } From 19c91161210c75bb803defc8262a98d284cea944 Mon Sep 17 00:00:00 2001 From: Tom RAMBEAU Date: Fri, 26 Jan 2024 13:27:38 +0100 Subject: [PATCH 3/6] modification reference de projet --- tp1/DbContextLib/DbContextLib.csproj | 17 ++++++++++++++++ tp1/Entities/BookEntity.cs | 1 + tp1/Entities/Entities.csproj | 13 ++++++++++++ .../StubbedContextLib.csproj | 13 ++++++++++++ tp1/tp1.sln | 20 ++++++++++++++++++- 5 files changed, 63 insertions(+), 1 deletion(-) diff --git a/tp1/DbContextLib/DbContextLib.csproj b/tp1/DbContextLib/DbContextLib.csproj index bb23fb7..f963c93 100644 --- a/tp1/DbContextLib/DbContextLib.csproj +++ b/tp1/DbContextLib/DbContextLib.csproj @@ -6,4 +6,21 @@ enable + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + diff --git a/tp1/Entities/BookEntity.cs b/tp1/Entities/BookEntity.cs index 50e79ff..3cde984 100644 --- a/tp1/Entities/BookEntity.cs +++ b/tp1/Entities/BookEntity.cs @@ -4,6 +4,7 @@ namespace Entities { public class BookEntity { + public int ID {get; set;} public string Title { get; set; } public string Author { get; set; } diff --git a/tp1/Entities/Entities.csproj b/tp1/Entities/Entities.csproj index bb23fb7..0c79874 100644 --- a/tp1/Entities/Entities.csproj +++ b/tp1/Entities/Entities.csproj @@ -6,4 +6,17 @@ enable + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + diff --git a/tp1/StubbedContextLib/StubbedContextLib.csproj b/tp1/StubbedContextLib/StubbedContextLib.csproj index cf7b1e0..e9bc770 100644 --- a/tp1/StubbedContextLib/StubbedContextLib.csproj +++ b/tp1/StubbedContextLib/StubbedContextLib.csproj @@ -6,6 +6,19 @@ enable + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + diff --git a/tp1/tp1.sln b/tp1/tp1.sln index 4524639..eed7fb5 100644 --- a/tp1/tp1.sln +++ b/tp1/tp1.sln @@ -3,7 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.8.34330.188 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tp1", "tp1\tp1.csproj", "{2097BC86-5063-42A3-83E2-1004732AC629}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestStubEF", "tp1\TestStubEF.csproj", "{2097BC86-5063-42A3-83E2-1004732AC629}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Entities", "Entities\Entities.csproj", "{19774C29-80C4-4B8C-A7D9-8F42576C4D1C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DbContextLib", "DbContextLib\DbContextLib.csproj", "{785FFEAF-A688-470C-AB63-5F83219177BC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StubbedContextLib", "StubbedContextLib\StubbedContextLib.csproj", "{56AB577F-DC4D-4DDE-81ED-6376FB52D5EA}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,6 +21,18 @@ Global {2097BC86-5063-42A3-83E2-1004732AC629}.Debug|Any CPU.Build.0 = Debug|Any CPU {2097BC86-5063-42A3-83E2-1004732AC629}.Release|Any CPU.ActiveCfg = Release|Any CPU {2097BC86-5063-42A3-83E2-1004732AC629}.Release|Any CPU.Build.0 = Release|Any CPU + {19774C29-80C4-4B8C-A7D9-8F42576C4D1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {19774C29-80C4-4B8C-A7D9-8F42576C4D1C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {19774C29-80C4-4B8C-A7D9-8F42576C4D1C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {19774C29-80C4-4B8C-A7D9-8F42576C4D1C}.Release|Any CPU.Build.0 = Release|Any CPU + {785FFEAF-A688-470C-AB63-5F83219177BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {785FFEAF-A688-470C-AB63-5F83219177BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {785FFEAF-A688-470C-AB63-5F83219177BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {785FFEAF-A688-470C-AB63-5F83219177BC}.Release|Any CPU.Build.0 = Release|Any CPU + {56AB577F-DC4D-4DDE-81ED-6376FB52D5EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {56AB577F-DC4D-4DDE-81ED-6376FB52D5EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {56AB577F-DC4D-4DDE-81ED-6376FB52D5EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {56AB577F-DC4D-4DDE-81ED-6376FB52D5EA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 3b773dea434e7a651b933672897754da2d53381a Mon Sep 17 00:00:00 2001 From: Tom RAMBEAU Date: Fri, 26 Jan 2024 16:33:12 +0100 Subject: [PATCH 4/6] modification des fichiers --- tp1/DbContextLib/LibraryContext.cs | 7 +++++-- tp1/StubbedContextLib/StubbedContext.cs | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tp1/DbContextLib/LibraryContext.cs b/tp1/DbContextLib/LibraryContext.cs index 2985321..1f8d92e 100644 --- a/tp1/DbContextLib/LibraryContext.cs +++ b/tp1/DbContextLib/LibraryContext.cs @@ -3,15 +3,18 @@ using Entities; namespace DbContextLib { + public class LibraryContext: DbContext { - public DbSet BookSet{ get; set; } + public DbSet BooksSet{ get; set; } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { - optionsBuilder.UseSqlite($"Data Source=data.Books.db"); + optionsBuilder.UseSqlite($"Data Source=tp1.Books.db"); } + } + } diff --git a/tp1/StubbedContextLib/StubbedContext.cs b/tp1/StubbedContextLib/StubbedContext.cs index 65e6ff1..b2e65bd 100644 --- a/tp1/StubbedContextLib/StubbedContext.cs +++ b/tp1/StubbedContextLib/StubbedContext.cs @@ -1,7 +1,11 @@ -namespace StubbedContextLib +using Entities; +using Microsoft.EntityFrameworkCore; + +namespace StubbedContextLib { - public class StubbedContext + public class StubbedContext : DbContext { + } } From 5ba4977cae7b94aed13be44b0beaf6833afd3d88 Mon Sep 17 00:00:00 2001 From: Tom RAMBEAU Date: Fri, 26 Jan 2024 17:44:17 +0100 Subject: [PATCH 5/6] =?UTF-8?q?modification=20mais=20probl=C3=A8me=20insta?= =?UTF-8?q?llation=20ef?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tp1/Library/DbContextLib/LibraryContext.cs | 22 ++++++++++ tp1/Library/Entities/BookEntity.cs | 22 ++++++++++ tp1/Library/Library.csproj | 22 ++++++++++ .../StubbedContextLib/StubbedContext.cs | 22 ++++++++++ tp1/TestStub/Program.cs | 40 +++++++++++++++++++ tp1/TestStub/TestStub.csproj | 28 +++++++++++++ tp1/tp1.sln | 32 +++++---------- tp1/tp1/Program.cs | 4 +- tp1/tp1/TestStubEF.csproj | 1 + 9 files changed, 170 insertions(+), 23 deletions(-) create mode 100644 tp1/Library/DbContextLib/LibraryContext.cs create mode 100644 tp1/Library/Entities/BookEntity.cs create mode 100644 tp1/Library/Library.csproj create mode 100644 tp1/Library/StubbedContextLib/StubbedContext.cs create mode 100644 tp1/TestStub/Program.cs create mode 100644 tp1/TestStub/TestStub.csproj diff --git a/tp1/Library/DbContextLib/LibraryContext.cs b/tp1/Library/DbContextLib/LibraryContext.cs new file mode 100644 index 0000000..5918c9d --- /dev/null +++ b/tp1/Library/DbContextLib/LibraryContext.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using Library.Entities; + + +namespace Library.DbContextLib +{ + public class LibraryContext : DbContext + { + public DbSet BooksSet { get; set; } + + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + optionsBuilder.UseSqlite($"Data Source=tp1.Books.db"); + } + + } +} diff --git a/tp1/Library/Entities/BookEntity.cs b/tp1/Library/Entities/BookEntity.cs new file mode 100644 index 0000000..4ecea42 --- /dev/null +++ b/tp1/Library/Entities/BookEntity.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Library.Entities +{ + public class BookEntity + { + public int ID { get; set; } + public string Title { get; set; } + public string Author { get; set; } + public string Isbn { get; set; } + + public BookEntity(string title, string author, string isbn) { + Title = title; + Author = author; + Isbn = isbn; + } + } +} diff --git a/tp1/Library/Library.csproj b/tp1/Library/Library.csproj new file mode 100644 index 0000000..0c79874 --- /dev/null +++ b/tp1/Library/Library.csproj @@ -0,0 +1,22 @@ + + + + net8.0 + enable + enable + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/tp1/Library/StubbedContextLib/StubbedContext.cs b/tp1/Library/StubbedContextLib/StubbedContext.cs new file mode 100644 index 0000000..4474e2b --- /dev/null +++ b/tp1/Library/StubbedContextLib/StubbedContext.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Library.DbContextLib; +using Library.Entities; +using Microsoft.EntityFrameworkCore; + +namespace Library.StubbedContextLib +{ + public class StubbedContext : DbContext + { + public List Books { get; set; } + + public StubbedContext() { + Books.Add(new BookEntity("test", "test", "test")); + Books.Add(new BookEntity("test2", "test2", "test2")); + } + + } +} diff --git a/tp1/TestStub/Program.cs b/tp1/TestStub/Program.cs new file mode 100644 index 0000000..8a17720 --- /dev/null +++ b/tp1/TestStub/Program.cs @@ -0,0 +1,40 @@ +using Library; +using Library.DbContextLib; +using Library.Entities; +using Microsoft.Extensions.Options; + +// See https://aka.ms/new-console-template for more information +Console.WriteLine("Hello, World!"); + +using (var context = new LibraryContext()) +{ + BookEntity chewie = new BookEntity("B3", "test", "test2"); + BookEntity yoda = new BookEntity ("B4", "test", "test2"); + BookEntity ewok = new BookEntity ("C5", "test", "test3"); + + context.BooksSet.Add(chewie); + context.BooksSet.Add(yoda); + context.BooksSet.Add(ewok); + context.SaveChanges(); +} + + +using (var context = new LibraryContext()) +{ + foreach (var n in context.BooksSet) + { + Console.WriteLine($"{n.ID} - {n.Title}"); + } + + context.SaveChanges(); + +} + +using (var context = new LibraryContext()) +{ + var eBooks = context.BooksSet.Where(b => b.Title.StartsWith("B")).First(); + Console.WriteLine($"{eBooks.Title} (born in {eBooks.Author})"); + + eBooks.Title = "Wicket"; + context.SaveChanges(); +} \ No newline at end of file diff --git a/tp1/TestStub/TestStub.csproj b/tp1/TestStub/TestStub.csproj new file mode 100644 index 0000000..546f891 --- /dev/null +++ b/tp1/TestStub/TestStub.csproj @@ -0,0 +1,28 @@ + + + + Exe + net8.0 + enable + enable + $(MSBuildProjectDirectory) + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/tp1/tp1.sln b/tp1/tp1.sln index eed7fb5..a0c64a8 100644 --- a/tp1/tp1.sln +++ b/tp1/tp1.sln @@ -3,13 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.8.34330.188 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestStubEF", "tp1\TestStubEF.csproj", "{2097BC86-5063-42A3-83E2-1004732AC629}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestStub", "TestStub\TestStub.csproj", "{8960D74C-259D-4779-80B6-789BA257D2B2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Entities", "Entities\Entities.csproj", "{19774C29-80C4-4B8C-A7D9-8F42576C4D1C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DbContextLib", "DbContextLib\DbContextLib.csproj", "{785FFEAF-A688-470C-AB63-5F83219177BC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StubbedContextLib", "StubbedContextLib\StubbedContextLib.csproj", "{56AB577F-DC4D-4DDE-81ED-6376FB52D5EA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Library", "Library\Library.csproj", "{CDD5A87A-187A-4BC1-9E23-5559A2211B55}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -17,22 +13,14 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2097BC86-5063-42A3-83E2-1004732AC629}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2097BC86-5063-42A3-83E2-1004732AC629}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2097BC86-5063-42A3-83E2-1004732AC629}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2097BC86-5063-42A3-83E2-1004732AC629}.Release|Any CPU.Build.0 = Release|Any CPU - {19774C29-80C4-4B8C-A7D9-8F42576C4D1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {19774C29-80C4-4B8C-A7D9-8F42576C4D1C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {19774C29-80C4-4B8C-A7D9-8F42576C4D1C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {19774C29-80C4-4B8C-A7D9-8F42576C4D1C}.Release|Any CPU.Build.0 = Release|Any CPU - {785FFEAF-A688-470C-AB63-5F83219177BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {785FFEAF-A688-470C-AB63-5F83219177BC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {785FFEAF-A688-470C-AB63-5F83219177BC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {785FFEAF-A688-470C-AB63-5F83219177BC}.Release|Any CPU.Build.0 = Release|Any CPU - {56AB577F-DC4D-4DDE-81ED-6376FB52D5EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {56AB577F-DC4D-4DDE-81ED-6376FB52D5EA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {56AB577F-DC4D-4DDE-81ED-6376FB52D5EA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {56AB577F-DC4D-4DDE-81ED-6376FB52D5EA}.Release|Any CPU.Build.0 = Release|Any CPU + {8960D74C-259D-4779-80B6-789BA257D2B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8960D74C-259D-4779-80B6-789BA257D2B2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8960D74C-259D-4779-80B6-789BA257D2B2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8960D74C-259D-4779-80B6-789BA257D2B2}.Release|Any CPU.Build.0 = Release|Any CPU + {CDD5A87A-187A-4BC1-9E23-5559A2211B55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CDD5A87A-187A-4BC1-9E23-5559A2211B55}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CDD5A87A-187A-4BC1-9E23-5559A2211B55}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CDD5A87A-187A-4BC1-9E23-5559A2211B55}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/tp1/tp1/Program.cs b/tp1/tp1/Program.cs index 83fa4f4..bb851ad 100644 --- a/tp1/tp1/Program.cs +++ b/tp1/tp1/Program.cs @@ -1,2 +1,4 @@ -// See https://aka.ms/new-console-template for more information +using Microsoft.EntityFrameworkCore.Design; + +// See https://aka.ms/new-console-template for more information Console.WriteLine("Hello, World!"); diff --git a/tp1/tp1/TestStubEF.csproj b/tp1/tp1/TestStubEF.csproj index c25f2d9..e4b7805 100644 --- a/tp1/tp1/TestStubEF.csproj +++ b/tp1/tp1/TestStubEF.csproj @@ -19,6 +19,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + From 90b016f200a59c9052b6d2f0bfac810673f82775 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 1 Feb 2024 15:51:53 +0100 Subject: [PATCH 6/6] ajouts migrations fonctionnelles --- .../20240201082456_BooksMigration.Designer.cs | 47 ++++++++++++++++++ .../20240201082456_BooksMigration.cs | 36 ++++++++++++++ .../Migrations/LibraryContextModelSnapshot.cs | 44 ++++++++++++++++ tp1/DbContextLib/tp1.Books.db | Bin 0 -> 20480 bytes tp1/Library/DbContextLib/LibraryContext.cs | 2 +- tp1/Library/tp.Books.db | Bin 0 -> 20480 bytes tp1/TestStub/BookEntity.cs | 23 +++++++++ tp1/TestStub/LibraryContext.cs | 22 ++++++++ ...20240201143359_BooksMigrations.Designer.cs | 47 ++++++++++++++++++ .../20240201143359_BooksMigrations.cs | 36 ++++++++++++++ .../Migrations/LibraryContextModelSnapshot.cs | 44 ++++++++++++++++ tp1/TestStub/Program.cs | 33 +++++++----- tp1/TestStub/StubbedContext.cs | 22 ++++++++ tp1/TestStub/tp.Books.db | Bin 0 -> 20480 bytes tp1/TestStubEF/Class1.cs | 7 --- tp1/TestStubEF/TestStubEF.csproj | 9 ---- tp1/tp1/Program.cs | 4 -- tp1/tp1/TestStubEF.csproj | 29 ----------- 18 files changed, 343 insertions(+), 62 deletions(-) create mode 100644 tp1/DbContextLib/Migrations/20240201082456_BooksMigration.Designer.cs create mode 100644 tp1/DbContextLib/Migrations/20240201082456_BooksMigration.cs create mode 100644 tp1/DbContextLib/Migrations/LibraryContextModelSnapshot.cs create mode 100644 tp1/DbContextLib/tp1.Books.db create mode 100644 tp1/Library/tp.Books.db create mode 100644 tp1/TestStub/BookEntity.cs create mode 100644 tp1/TestStub/LibraryContext.cs create mode 100644 tp1/TestStub/Migrations/20240201143359_BooksMigrations.Designer.cs create mode 100644 tp1/TestStub/Migrations/20240201143359_BooksMigrations.cs create mode 100644 tp1/TestStub/Migrations/LibraryContextModelSnapshot.cs create mode 100644 tp1/TestStub/StubbedContext.cs create mode 100644 tp1/TestStub/tp.Books.db delete mode 100644 tp1/TestStubEF/Class1.cs delete mode 100644 tp1/TestStubEF/TestStubEF.csproj delete mode 100644 tp1/tp1/Program.cs delete mode 100644 tp1/tp1/TestStubEF.csproj diff --git a/tp1/DbContextLib/Migrations/20240201082456_BooksMigration.Designer.cs b/tp1/DbContextLib/Migrations/20240201082456_BooksMigration.Designer.cs new file mode 100644 index 0000000..69346df --- /dev/null +++ b/tp1/DbContextLib/Migrations/20240201082456_BooksMigration.Designer.cs @@ -0,0 +1,47 @@ +// +using DbContextLib; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace DbContextLib.Migrations +{ + [DbContext(typeof(LibraryContext))] + [Migration("20240201082456_BooksMigration")] + partial class BooksMigration + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.1"); + + modelBuilder.Entity("Entities.BookEntity", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Author") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Isbn") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Title") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("BooksSet"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/tp1/DbContextLib/Migrations/20240201082456_BooksMigration.cs b/tp1/DbContextLib/Migrations/20240201082456_BooksMigration.cs new file mode 100644 index 0000000..2e153c8 --- /dev/null +++ b/tp1/DbContextLib/Migrations/20240201082456_BooksMigration.cs @@ -0,0 +1,36 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace DbContextLib.Migrations +{ + /// + public partial class BooksMigration : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "BooksSet", + columns: table => new + { + ID = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Title = table.Column(type: "TEXT", nullable: false), + Author = table.Column(type: "TEXT", nullable: false), + Isbn = table.Column(type: "TEXT", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_BooksSet", x => x.ID); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "BooksSet"); + } + } +} diff --git a/tp1/DbContextLib/Migrations/LibraryContextModelSnapshot.cs b/tp1/DbContextLib/Migrations/LibraryContextModelSnapshot.cs new file mode 100644 index 0000000..61df967 --- /dev/null +++ b/tp1/DbContextLib/Migrations/LibraryContextModelSnapshot.cs @@ -0,0 +1,44 @@ +// +using DbContextLib; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace DbContextLib.Migrations +{ + [DbContext(typeof(LibraryContext))] + partial class LibraryContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.1"); + + modelBuilder.Entity("Entities.BookEntity", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Author") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Isbn") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Title") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("BooksSet"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/tp1/DbContextLib/tp1.Books.db b/tp1/DbContextLib/tp1.Books.db new file mode 100644 index 0000000000000000000000000000000000000000..0ba5d307da1087e14d507ce396c2d0aa49da740e GIT binary patch literal 20480 zcmeI&Jx|*}7zgk>CqRkhrkf|ElO-e&C~{It7;C6WEfObnj*6(NEJI9dHQ2(wNHEfV zlkWX8-8yye+<}ox8uMZ~-9i6HKKWkkC%&J(_?-T`b|?aN8YgGIU@yrFqA27wV}uYz zmIYa|n6%4TL+NP2=-^ufz)gS6#SwTPm0uX=z1Rwwb2tWV=5P(2| zK(D;0ZEVni@Q+79dOnh`YhD_hkAvtW-(1*pEt6Y}o4aj`<&Is8{Ig(Fp1FSYp|qr} ztk7@E)113;{3Y!NBHNcAWYM#3ovo=ACPTO1=*)Jw)v{dXbUAYl+ikYjb^6>jWk1t< z2j1OTJ=gA-?tmRw17;rbuI9R3%EI!A{oIyK1j&eh4 zW&P@iE@{ms{o0+*&hxDOPWUPDMHolv+b|Vza#`4^Je+soF?R^JIqhNY8uAo#65Vsj zX4^~R;rK+n50X?~Y%Z;wnyoBqADfhf(J;7}-Clnz;%VC}{2i}e*jJ>RJTK!GrhJXMBAOHafKmY;|fB*y_009U<;BgADQfv9YivW}F|ME}&2nav`0uX=z u1Rwwb2tWV=5P$##p0EJk|DW*9#nd1G0SG_<0uX=z1Rwwb2tWV=Gl3iQE!=GY literal 0 HcmV?d00001 diff --git a/tp1/Library/DbContextLib/LibraryContext.cs b/tp1/Library/DbContextLib/LibraryContext.cs index 5918c9d..853f9cc 100644 --- a/tp1/Library/DbContextLib/LibraryContext.cs +++ b/tp1/Library/DbContextLib/LibraryContext.cs @@ -15,7 +15,7 @@ namespace Library.DbContextLib protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { - optionsBuilder.UseSqlite($"Data Source=tp1.Books.db"); + optionsBuilder.UseSqlite("Data Source=tp.Books.db"); } } diff --git a/tp1/Library/tp.Books.db b/tp1/Library/tp.Books.db new file mode 100644 index 0000000000000000000000000000000000000000..74136d85c27cf0598f5fee8679ebaacb95356643 GIT binary patch literal 20480 zcmeI&J#W)M7zgk>Cv9mY6E;tk4iBhRtH=qF(h;{DU^Q`qC$kgt#x3!`|xu$S2>6{lxdP7oRhH-HoJRr%8GqO7@gIBAP~?F-8c{ zR9R6ak6F8#H`Jcqs4uH(q;dL7um2%c{VRF+z5Y%AtttozKmY;|fB*y_009U<00Iyw z5g1fgjqPnZlHu`0WET_lx)x;OVk+X3VsmBR6acDro9?+$&>R{hKz z90b>A4Lql3dn0zhN6bF-`;M#f_qgltEYkUroCuTo{79u*q|3+bseGTLO9q|nI4%t7 zwXMq|x@L4b^mBhcyCC2%deK=L$|#AmS5YRD^iyf4c6;8X$6O;^<#fh{Yba7INp!;{ zpY0$`#?uq|Mx>d#*g{%0HAh=D-gPL6;<5O+xV_<2Ci8Ys`a40hw7a4nv1yX zG;3;JwEmN*4FLfNKmY;|fB*y_009U<00Izzz?~F$TyfU_zX&k<{;&S@kAMIKAOHaf vKmY;|fB*y_009U<;2sO${r?`{TucoD5P$##AOHafKmY;|fB*y_un_nQi BooksSet { get; set; } + + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + optionsBuilder.UseSqlite("Data Source=tp.Books.db"); + } + + } +} diff --git a/tp1/TestStub/Migrations/20240201143359_BooksMigrations.Designer.cs b/tp1/TestStub/Migrations/20240201143359_BooksMigrations.Designer.cs new file mode 100644 index 0000000..c4db459 --- /dev/null +++ b/tp1/TestStub/Migrations/20240201143359_BooksMigrations.Designer.cs @@ -0,0 +1,47 @@ +// +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using TestStub; + +#nullable disable + +namespace TestStub.Migrations +{ + [DbContext(typeof(LibraryContext))] + [Migration("20240201143359_BooksMigrations")] + partial class BooksMigrations + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.1"); + + modelBuilder.Entity("TestStub.BookEntity", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Author") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Isbn") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Title") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("BooksSet"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/tp1/TestStub/Migrations/20240201143359_BooksMigrations.cs b/tp1/TestStub/Migrations/20240201143359_BooksMigrations.cs new file mode 100644 index 0000000..1a50d42 --- /dev/null +++ b/tp1/TestStub/Migrations/20240201143359_BooksMigrations.cs @@ -0,0 +1,36 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace TestStub.Migrations +{ + /// + public partial class BooksMigrations : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "BooksSet", + columns: table => new + { + ID = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Title = table.Column(type: "TEXT", nullable: false), + Author = table.Column(type: "TEXT", nullable: false), + Isbn = table.Column(type: "TEXT", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_BooksSet", x => x.ID); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "BooksSet"); + } + } +} diff --git a/tp1/TestStub/Migrations/LibraryContextModelSnapshot.cs b/tp1/TestStub/Migrations/LibraryContextModelSnapshot.cs new file mode 100644 index 0000000..8c1c247 --- /dev/null +++ b/tp1/TestStub/Migrations/LibraryContextModelSnapshot.cs @@ -0,0 +1,44 @@ +// +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using TestStub; + +#nullable disable + +namespace TestStub.Migrations +{ + [DbContext(typeof(LibraryContext))] + partial class LibraryContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.1"); + + modelBuilder.Entity("TestStub.BookEntity", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Author") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Isbn") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Title") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("BooksSet"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/tp1/TestStub/Program.cs b/tp1/TestStub/Program.cs index 8a17720..7d494f6 100644 --- a/tp1/TestStub/Program.cs +++ b/tp1/TestStub/Program.cs @@ -1,6 +1,4 @@ -using Library; -using Library.DbContextLib; -using Library.Entities; +using TestStub; using Microsoft.Extensions.Options; // See https://aka.ms/new-console-template for more information @@ -8,13 +6,16 @@ Console.WriteLine("Hello, World!"); using (var context = new LibraryContext()) { - BookEntity chewie = new BookEntity("B3", "test", "test2"); - BookEntity yoda = new BookEntity ("B4", "test", "test2"); - BookEntity ewok = new BookEntity ("C5", "test", "test3"); + BookEntity chewie = new BookEntity("B3", "test1", "test1"); + BookEntity yoda = new BookEntity ("B4", "test2", "test2"); + BookEntity ewok = new BookEntity ("mistake", "test3", "test3"); + BookEntity the100 = new BookEntity("the100", "test4", "test4"); context.BooksSet.Add(chewie); context.BooksSet.Add(yoda); context.BooksSet.Add(ewok); + context.BooksSet.Add(the100); + context.SaveChanges(); } @@ -23,18 +24,26 @@ using (var context = new LibraryContext()) { foreach (var n in context.BooksSet) { - Console.WriteLine($"{n.ID} - {n.Title}"); + Console.WriteLine($"Books: {n.ID} - {n.Title}"); } - context.SaveChanges(); - } + using (var context = new LibraryContext()) { - var eBooks = context.BooksSet.Where(b => b.Title.StartsWith("B")).First(); - Console.WriteLine($"{eBooks.Title} (born in {eBooks.Author})"); + var eBooks = context.BooksSet.Where(b => b.Title.StartsWith("t")).First(); + Console.WriteLine($"{eBooks.Title} (made by {eBooks.Author})"); + eBooks.Title = "Border"; + context.SaveChanges(); +} - eBooks.Title = "Wicket"; +using (var context = new LibraryContext()) +{ + Console.WriteLine("Deletes one item from de database"); + var impostor = context.BooksSet + .SingleOrDefault(n => n.Title.Equals("mistake")); + context.Remove(impostor); context.SaveChanges(); + } \ No newline at end of file diff --git a/tp1/TestStub/StubbedContext.cs b/tp1/TestStub/StubbedContext.cs new file mode 100644 index 0000000..f397ada --- /dev/null +++ b/tp1/TestStub/StubbedContext.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Library.DbContextLib; +using Library.Entities; +using Microsoft.EntityFrameworkCore; + +namespace TestStub +{ + public class StubbedContext : DbContext + { + public List Books { get; set; } + + public StubbedContext() { + Books.Add(new BookEntity("test", "test", "test")); + Books.Add(new BookEntity("test2", "test2", "test2")); + } + + } +} diff --git a/tp1/TestStub/tp.Books.db b/tp1/TestStub/tp.Books.db new file mode 100644 index 0000000000000000000000000000000000000000..9b976f72c8e32c5b33a8a142f0d5c825a0a427c6 GIT binary patch literal 20480 zcmeI)Jx|*}7zgmXybz$63sR6%w)6bp!j?MUrN zJ9g=3VDHvX(Xms9svn?3g;0l%y*QW`%jq8Je{%ft+}-25pS{>hvhku~`xf7K+~cOt zizG`ZB~Lgfgh=9(7N4*r#7-(a5L@P`4XJq^v`z-wtJ17u<00bZa z0SG_<0uX=z1RxM2P)`lXb8~dZZ|)vh-pP@8Tr)lEq+_-BqKD~~hE_5(Zj{OujYrzf zw42A)yy!W5`YM@`r>E(MksxQ;aSpu=%MZ7yTUqj9IL~LKQ7%eef12ld)zF@64PLDo zyt-Mb@ReG1!)TO5oagIn=5?=nLtig7cKDjM!%Le+O|Odl>sr;Azf5P?{*jgEhPEwI zU8W1`N*({ear;#2-flZmC5_IWZqtmsyiDKMg4vm-_H5mL<2HTUX?v@-=R5AZ*kI!J zykpy3BV6UwTahtDDf%S3;S$ca?mDf`p1)3H!oK_Lco+XRO0Mu^&uj6?T98TvVYz00Izz00bZa0SG_<0uX=z z1O`rElBLN#S@sVsrBLuK&tD8yY?a)dlI3IZ^MK}|)eRMc)r6EL6S7lyBN4ji2*|Z0uX=z1Rwwb2tWV= U5P$##AkbG}j3%dP`1cI#A1X#Pt^fc4 literal 0 HcmV?d00001 diff --git a/tp1/TestStubEF/Class1.cs b/tp1/TestStubEF/Class1.cs deleted file mode 100644 index 7e68d8e..0000000 --- a/tp1/TestStubEF/Class1.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace TestStubEF -{ - public class Class1 - { - - } -} diff --git a/tp1/TestStubEF/TestStubEF.csproj b/tp1/TestStubEF/TestStubEF.csproj deleted file mode 100644 index bb23fb7..0000000 --- a/tp1/TestStubEF/TestStubEF.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - net8.0 - enable - enable - - - diff --git a/tp1/tp1/Program.cs b/tp1/tp1/Program.cs deleted file mode 100644 index bb851ad..0000000 --- a/tp1/tp1/Program.cs +++ /dev/null @@ -1,4 +0,0 @@ -using Microsoft.EntityFrameworkCore.Design; - -// See https://aka.ms/new-console-template for more information -Console.WriteLine("Hello, World!"); diff --git a/tp1/tp1/TestStubEF.csproj b/tp1/tp1/TestStubEF.csproj deleted file mode 100644 index e4b7805..0000000 --- a/tp1/tp1/TestStubEF.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - Exe - net8.0 - enable - enable - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - -