From d45b610e07842e70e6db987b5a5b2fa7a149aa32 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Fri, 12 Nov 2021 11:03:03 -0500 Subject: [PATCH 1/2] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d1532da0d..333190231 100644 --- a/README.md +++ b/README.md @@ -45,8 +45,9 @@ Or if you're feeling really generous, we now support GitHub sponsorships - see t ## Versions -The master branch is now using .NET 5. If you need a previous version use one of these tagged commits: +The master branch is now using .NET 6. If you need a previous version use one of these tagged commits: +- [5.0](https://github.com/ardalis/CleanArchitecture/releases/tag/dotnet-core-5) - [3.1](https://github.com/ardalis/CleanArchitecture/tree/dotnet-core-3.1) - [2.2](https://github.com/ardalis/CleanArchitecture/tree/dotnet-core-2.2) - [2.0](https://github.com/ardalis/CleanArchitecture/tree/dotnet-core-2.0) @@ -61,9 +62,9 @@ The master branch is now using .NET 5. If you need a previous version use one of To use this template, there are a few options: +- Install using `dotnet new` (preferred - see below) - [Install the Visual Studio Template](https://marketplace.visualstudio.com/items?itemName=GregTrevellick.CleanArchitecture) and use it within Visual Studio - Download this Repository -- Install using `dotnet new` (see below) These are all covered below. From 2cc3a41dc64ab1da9b85930ac7155729ea3016a3 Mon Sep 17 00:00:00 2001 From: Felix Winterhalter Date: Fri, 12 Nov 2021 20:37:32 +0100 Subject: [PATCH 2/2] fix: Fix tests seeding db twice (#277) --- src/Clean.Architecture.Web/SeedData.cs | 5 ++++- .../CustomWebApplicationFactory.cs | 9 ++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Clean.Architecture.Web/SeedData.cs b/src/Clean.Architecture.Web/SeedData.cs index 4e6841c3d..fa72a4bf6 100644 --- a/src/Clean.Architecture.Web/SeedData.cs +++ b/src/Clean.Architecture.Web/SeedData.cs @@ -41,13 +41,16 @@ public static void Initialize(IServiceProvider serviceProvider) } public static void PopulateTestData(AppDbContext dbContext) { + foreach (var item in dbContext.Projects) + { + dbContext.Remove(item); + } foreach (var item in dbContext.ToDoItems) { dbContext.Remove(item); } dbContext.SaveChanges(); - TestProject1.Id = 1; TestProject1.AddItem(ToDoItem1); TestProject1.AddItem(ToDoItem2); TestProject1.AddItem(ToDoItem3); diff --git a/tests/Clean.Architecture.FunctionalTests/CustomWebApplicationFactory.cs b/tests/Clean.Architecture.FunctionalTests/CustomWebApplicationFactory.cs index 2ed4859cd..b44b30bb6 100644 --- a/tests/Clean.Architecture.FunctionalTests/CustomWebApplicationFactory.cs +++ b/tests/Clean.Architecture.FunctionalTests/CustomWebApplicationFactory.cs @@ -23,7 +23,7 @@ public class CustomWebApplicationFactory : WebApplicationFactory