Skip to content

Commit 6e0742b

Browse files
authored
v9 with Use Cases, SharedKernel as Nuget Ref, and More (#585)
* adding more tags * Removing SharedKernel Adding reference to Ardalis.SharedKernel * Fix using statements * Delete SharedKernel artifacts Adding UseCases and CQRS commands and queries * Adding basic logging Removing controller and razor pages and views from web project * Adding another command and a behavior * Createcontributor use case done * Adding queries for Contributor * Removing more web things Configure LoggingBehavior and tested it * add logging isenabled check * refactoring to make usecases depend on core not infra * Cleaning up and refactoring * Refactoring Use Cases folder structure * Updating to use Fast Endpoints standard Swagger, XML Comments, and custom interfaces for query/command/handlers * Update now uses Mediator * Adding test and comments * Removing excess scope Updating NuGet dependencies * Removed Projects and ToDoItems Fixed Tests * Moving from Moq to NSubstitute * Update template file with new version and release notes * WIP Working on migrating ApiEndpoints to FastEndpoints for Projects * Sample builds; some tests failing * Ading MarkToDoItemCompleteHandler - in progress * All tests pass Reorganized tests * Adding XML comments * Fixed bug in CreateToDoItem that was resulting in no Location header being set * Update README * Add tests for Update Contributor * adding more tests
1 parent d4ad894 commit 6e0742b

File tree

346 files changed

+78947
-2107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

346 files changed

+78947
-2107
lines changed

Clean.Architecture.sln

+15-15
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.Integrat
3131
{220361D6-9C76-4E3F-BD34-3C7B50E2CA4D} = {220361D6-9C76-4E3F-BD34-3C7B50E2CA4D}
3232
EndProjectSection
3333
EndProject
34-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.SharedKernel", "src\Clean.Architecture.SharedKernel\Clean.Architecture.SharedKernel.csproj", "{744AD1DC-E83E-4ACE-BE57-395395D6E357}"
35-
EndProject
3634
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.UnitTests", "tests\Clean.Architecture.UnitTests\Clean.Architecture.UnitTests.csproj", "{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5}"
3735
EndProject
36+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Clean.Architecture.UseCases", "src\Clean.Architecture.UseCases\Clean.Architecture.UseCases.csproj", "{B74A78FF-B79E-4C38-A9C7-084A90990CAD}"
37+
EndProject
3838
Global
3939
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4040
Debug|Any CPU = Debug|Any CPU
@@ -105,18 +105,6 @@ Global
105105
{0776DC14-9000-47A4-A3F4-ECBCF8CEBC17}.Release|x64.Build.0 = Release|Any CPU
106106
{0776DC14-9000-47A4-A3F4-ECBCF8CEBC17}.Release|x86.ActiveCfg = Release|Any CPU
107107
{0776DC14-9000-47A4-A3F4-ECBCF8CEBC17}.Release|x86.Build.0 = Release|Any CPU
108-
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
109-
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Debug|Any CPU.Build.0 = Debug|Any CPU
110-
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Debug|x64.ActiveCfg = Debug|Any CPU
111-
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Debug|x64.Build.0 = Debug|Any CPU
112-
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Debug|x86.ActiveCfg = Debug|Any CPU
113-
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Debug|x86.Build.0 = Debug|Any CPU
114-
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Release|Any CPU.ActiveCfg = Release|Any CPU
115-
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Release|Any CPU.Build.0 = Release|Any CPU
116-
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Release|x64.ActiveCfg = Release|Any CPU
117-
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Release|x64.Build.0 = Release|Any CPU
118-
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Release|x86.ActiveCfg = Release|Any CPU
119-
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Release|x86.Build.0 = Release|Any CPU
120108
{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
121109
{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
122110
{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -129,6 +117,18 @@ Global
129117
{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5}.Release|x64.Build.0 = Release|Any CPU
130118
{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5}.Release|x86.ActiveCfg = Release|Any CPU
131119
{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5}.Release|x86.Build.0 = Release|Any CPU
120+
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
121+
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
122+
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Debug|x64.ActiveCfg = Debug|Any CPU
123+
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Debug|x64.Build.0 = Debug|Any CPU
124+
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Debug|x86.ActiveCfg = Debug|Any CPU
125+
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Debug|x86.Build.0 = Debug|Any CPU
126+
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
127+
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Release|Any CPU.Build.0 = Release|Any CPU
128+
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Release|x64.ActiveCfg = Release|Any CPU
129+
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Release|x64.Build.0 = Release|Any CPU
130+
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Release|x86.ActiveCfg = Release|Any CPU
131+
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Release|x86.Build.0 = Release|Any CPU
132132
EndGlobalSection
133133
GlobalSection(SolutionProperties) = preSolution
134134
HideSolutionNode = FALSE
@@ -139,8 +139,8 @@ Global
139139
{220361D6-9C76-4E3F-BD34-3C7B50E2CA4D} = {106AE906-5075-410A-B941-912F811848EE}
140140
{7D84EFEE-A7D9-44AD-A0A3-38EC7882D94C} = {B31B4797-1D9F-4288-808C-BE9A31A98C7D}
141141
{0776DC14-9000-47A4-A3F4-ECBCF8CEBC17} = {B31B4797-1D9F-4288-808C-BE9A31A98C7D}
142-
{744AD1DC-E83E-4ACE-BE57-395395D6E357} = {106AE906-5075-410A-B941-912F811848EE}
143142
{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5} = {B31B4797-1D9F-4288-808C-BE9A31A98C7D}
143+
{B74A78FF-B79E-4C38-A9C7-084A90990CAD} = {106AE906-5075-410A-B941-912F811848EE}
144144
EndGlobalSection
145145
GlobalSection(ExtensibilityGlobals) = postSolution
146146
SolutionGuid = {B0F19343-8185-4A9F-9165-0EA8544BC925}

CleanArchitecture.nuspec

+18-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<metadata>
44
<id>Ardalis.CleanArchitecture.Template</id>
55
<title>ASP.NET Core Clean Architecture Solution</title>
6-
<version>7.1.0</version>
6+
<version>8.0.0</version>
77
<authors>Steve Smith, Erik Dahl</authors>
88
<description>
99
The Clean Architecture Solution Template popularized by Steve @ardalis Smith. Provides a great starting point for modern and/or DDD solutions built with .NET 7 and C# 11.
@@ -12,16 +12,30 @@
1212
<language>en-US</language>
1313
<license type="expression">MIT</license>
1414
<projectUrl>https://github.com/ardalis/CleanArchitecture</projectUrl>
15-
<releaseNotes>Updated package dependencies</releaseNotes>
15+
<releaseNotes>
16+
Major changes included in this release!
17+
* Removed separate SharedKernel project
18+
* Added reference to default Ardalis.SharedKernel package
19+
* Added instructions on how to create and use your own SharedKernel NuGet package
20+
* Added explicit UseCases project that depends on Core
21+
* Expanded use of MediatR to communicate between UI and UseCases
22+
* Included an example LoggingBehavior in MediatR pipeline
23+
* Moved from Moq to NSubstitute for mocking in tests
24+
* Removed all but Minimal APIs from Web project
25+
* Using FastEndpoints for all endpoints
26+
* Removed home page and replaced with Swagger UI
27+
* Trimmed scope of sample code in the template
28+
* Added separate /sample folder in GitHub repo with more detailed sample code
29+
</releaseNotes>
1630
<packageTypes>
1731
<packageType name="Template" />
1832
</packageTypes>
19-
<tags>Web ASP.NET "Clean Architecture" ddd</tags>
33+
<tags>Web ASP.NET "Clean Architecture" ddd domain-driven-design clean-architecture clean architecture ardalis SOLID</tags>
2034
<icon>./content/icon.png</icon>
2135
<readme>README.md</readme>
2236
</metadata>
2337
<files>
24-
<file src=".\**" target="content" exclude="**\bin\**;**\obj\**;**\.git\**;**\.github\**;**\*.user;**\.vs\**;**\.vscode\**;**\.gitignore" />
38+
<file src=".\**" target="content" exclude="**\bin\**;**\obj\**;**\.git\**;**\.github\**;**\*.user;**\.vs\**;**\.vscode\**;**\.gitignore;**\sample\**" />
2539
<file src="README.md" />
2640
</files>
2741
</package>

Directory.Build.props

+3
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@
44
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
55
<TargetFramework>net7.0</TargetFramework>
66
</PropertyGroup>
7+
<PropertyGroup>
8+
<NoWarn>1591</NoWarn> <!-- Remove this to turn on warnings for missing XML Comments -->
9+
</PropertyGroup>
710
</Project>

Directory.Packages.props

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,36 @@
11
<Project>
22
<ItemGroup>
3-
<PackageVersion Include="Ardalis.ApiEndpoints" Version="4.1.0" />
4-
<PackageVersion Include="Ardalis.GuardClauses" Version="4.0.1" />
3+
<PackageVersion Include="Ardalis.GuardClauses" Version="4.1.1" />
54
<PackageVersion Include="Ardalis.HttpClientTestExtensions" Version="4.1.0" />
65
<PackageVersion Include="Ardalis.ListStartupServices" Version="1.1.4" />
76
<PackageVersion Include="Ardalis.Result" Version="7.1.0" />
87
<PackageVersion Include="Ardalis.Result.AspNetCore" Version="7.1.0" />
8+
<PackageVersion Include="Ardalis.SharedKernel" Version="1.3.0" />
99
<PackageVersion Include="Ardalis.SmartEnum" Version="7.0.0" />
1010
<PackageVersion Include="Ardalis.Specification" Version="7.0.0" />
1111
<PackageVersion Include="Ardalis.Specification.EntityFrameworkCore" Version="7.0.0" />
1212
<PackageVersion Include="Autofac" Version="7.0.1" />
1313
<PackageVersion Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
1414
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
15-
<PackageVersion Include="FastEndpoints" Version="5.14.0" />
16-
<PackageVersion Include="FastEndpoints.ApiExplorer" Version="2.1.0" />
17-
<PackageVersion Include="FastEndpoints.Swagger" Version="5.10.0" />
18-
<PackageVersion Include="FastEndpoints.Swagger.Swashbuckle" Version="2.1.0" />
15+
<PackageVersion Include="FastEndpoints" Version="5.15.0" />
16+
<PackageVersion Include="FastEndpoints.ApiExplorer" Version="2.2.0" />
17+
<PackageVersion Include="FastEndpoints.Swagger" Version="5.15.0" />
18+
<PackageVersion Include="FastEndpoints.Swagger.Swashbuckle" Version="2.2.0" />
1919
<PackageVersion Include="FluentAssertions" Version="6.11.0" />
2020
<PackageVersion Include="MediatR" Version="12.1.1" />
21-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.9" />
22-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.9" />
23-
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.9" />
24-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.9" />
25-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.9" />
26-
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.9" />
27-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
21+
<PackageVersion Include="MediatR.Extensions.Autofac.DependencyInjection" Version="11.1.0" />
22+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.10" />
23+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.10" />
24+
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.10" />
25+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.10" />
26+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.10" />
27+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.10" />
28+
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.10" />
29+
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
30+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.7.0" />
2831
<PackageVersion Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.8" />
29-
<PackageVersion Include="Moq" Version="4.18.4" />
3032
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
33+
<PackageVersion Include="NSubstitute" Version="5.0.0" />
3134
<PackageVersion Include="ReportGenerator" Version="5.1.23" />
3235
<PackageVersion Include="Serilog.AspNetCore" Version="7.0.0" />
3336
<PackageVersion Include="Serilog.Sinks.ApplicationInsights" Version="4.0.1-dev-00040" />

0 commit comments

Comments
 (0)