Skip to content

Commit

Permalink
v9 with Use Cases, SharedKernel as Nuget Ref, and More (#585)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ardalis authored Aug 28, 2023
1 parent d4ad894 commit 6e0742b
Show file tree
Hide file tree
Showing 346 changed files with 78,947 additions and 2,107 deletions.
30 changes: 15 additions & 15 deletions Clean.Architecture.sln
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.Integrat
{220361D6-9C76-4E3F-BD34-3C7B50E2CA4D} = {220361D6-9C76-4E3F-BD34-3C7B50E2CA4D}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.SharedKernel", "src\Clean.Architecture.SharedKernel\Clean.Architecture.SharedKernel.csproj", "{744AD1DC-E83E-4ACE-BE57-395395D6E357}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.UnitTests", "tests\Clean.Architecture.UnitTests\Clean.Architecture.UnitTests.csproj", "{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Clean.Architecture.UseCases", "src\Clean.Architecture.UseCases\Clean.Architecture.UseCases.csproj", "{B74A78FF-B79E-4C38-A9C7-084A90990CAD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -105,18 +105,6 @@ Global
{0776DC14-9000-47A4-A3F4-ECBCF8CEBC17}.Release|x64.Build.0 = Release|Any CPU
{0776DC14-9000-47A4-A3F4-ECBCF8CEBC17}.Release|x86.ActiveCfg = Release|Any CPU
{0776DC14-9000-47A4-A3F4-ECBCF8CEBC17}.Release|x86.Build.0 = Release|Any CPU
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Debug|Any CPU.Build.0 = Debug|Any CPU
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Debug|x64.ActiveCfg = Debug|Any CPU
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Debug|x64.Build.0 = Debug|Any CPU
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Debug|x86.ActiveCfg = Debug|Any CPU
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Debug|x86.Build.0 = Debug|Any CPU
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Release|Any CPU.ActiveCfg = Release|Any CPU
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Release|Any CPU.Build.0 = Release|Any CPU
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Release|x64.ActiveCfg = Release|Any CPU
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Release|x64.Build.0 = Release|Any CPU
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Release|x86.ActiveCfg = Release|Any CPU
{744AD1DC-E83E-4ACE-BE57-395395D6E357}.Release|x86.Build.0 = Release|Any CPU
{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand All @@ -129,6 +117,18 @@ Global
{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5}.Release|x64.Build.0 = Release|Any CPU
{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5}.Release|x86.ActiveCfg = Release|Any CPU
{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5}.Release|x86.Build.0 = Release|Any CPU
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Debug|x64.ActiveCfg = Debug|Any CPU
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Debug|x64.Build.0 = Debug|Any CPU
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Debug|x86.ActiveCfg = Debug|Any CPU
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Debug|x86.Build.0 = Debug|Any CPU
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Release|Any CPU.Build.0 = Release|Any CPU
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Release|x64.ActiveCfg = Release|Any CPU
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Release|x64.Build.0 = Release|Any CPU
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Release|x86.ActiveCfg = Release|Any CPU
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -139,8 +139,8 @@ Global
{220361D6-9C76-4E3F-BD34-3C7B50E2CA4D} = {106AE906-5075-410A-B941-912F811848EE}
{7D84EFEE-A7D9-44AD-A0A3-38EC7882D94C} = {B31B4797-1D9F-4288-808C-BE9A31A98C7D}
{0776DC14-9000-47A4-A3F4-ECBCF8CEBC17} = {B31B4797-1D9F-4288-808C-BE9A31A98C7D}
{744AD1DC-E83E-4ACE-BE57-395395D6E357} = {106AE906-5075-410A-B941-912F811848EE}
{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5} = {B31B4797-1D9F-4288-808C-BE9A31A98C7D}
{B74A78FF-B79E-4C38-A9C7-084A90990CAD} = {106AE906-5075-410A-B941-912F811848EE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B0F19343-8185-4A9F-9165-0EA8544BC925}
Expand Down
22 changes: 18 additions & 4 deletions CleanArchitecture.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<metadata>
<id>Ardalis.CleanArchitecture.Template</id>
<title>ASP.NET Core Clean Architecture Solution</title>
<version>7.1.0</version>
<version>8.0.0</version>
<authors>Steve Smith, Erik Dahl</authors>
<description>
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.
Expand All @@ -12,16 +12,30 @@
<language>en-US</language>
<license type="expression">MIT</license>
<projectUrl>https://github.com/ardalis/CleanArchitecture</projectUrl>
<releaseNotes>Updated package dependencies</releaseNotes>
<releaseNotes>
Major changes included in this release!
* Removed separate SharedKernel project
* Added reference to default Ardalis.SharedKernel package
* Added instructions on how to create and use your own SharedKernel NuGet package
* Added explicit UseCases project that depends on Core
* Expanded use of MediatR to communicate between UI and UseCases
* Included an example LoggingBehavior in MediatR pipeline
* Moved from Moq to NSubstitute for mocking in tests
* Removed all but Minimal APIs from Web project
* Using FastEndpoints for all endpoints
* Removed home page and replaced with Swagger UI
* Trimmed scope of sample code in the template
* Added separate /sample folder in GitHub repo with more detailed sample code
</releaseNotes>
<packageTypes>
<packageType name="Template" />
</packageTypes>
<tags>Web ASP.NET "Clean Architecture" ddd</tags>
<tags>Web ASP.NET "Clean Architecture" ddd domain-driven-design clean-architecture clean architecture ardalis SOLID</tags>
<icon>./content/icon.png</icon>
<readme>README.md</readme>
</metadata>
<files>
<file src=".\**" target="content" exclude="**\bin\**;**\obj\**;**\.git\**;**\.github\**;**\*.user;**\.vs\**;**\.vscode\**;**\.gitignore" />
<file src=".\**" target="content" exclude="**\bin\**;**\obj\**;**\.git\**;**\.github\**;**\*.user;**\.vs\**;**\.vscode\**;**\.gitignore;**\sample\**" />
<file src="README.md" />
</files>
</package>
3 changes: 3 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<NoWarn>1591</NoWarn> <!-- Remove this to turn on warnings for missing XML Comments -->
</PropertyGroup>
</Project>
31 changes: 17 additions & 14 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
<Project>
<ItemGroup>
<PackageVersion Include="Ardalis.ApiEndpoints" Version="4.1.0" />
<PackageVersion Include="Ardalis.GuardClauses" Version="4.0.1" />
<PackageVersion Include="Ardalis.GuardClauses" Version="4.1.1" />
<PackageVersion Include="Ardalis.HttpClientTestExtensions" Version="4.1.0" />
<PackageVersion Include="Ardalis.ListStartupServices" Version="1.1.4" />
<PackageVersion Include="Ardalis.Result" Version="7.1.0" />
<PackageVersion Include="Ardalis.Result.AspNetCore" Version="7.1.0" />
<PackageVersion Include="Ardalis.SharedKernel" Version="1.3.0" />
<PackageVersion Include="Ardalis.SmartEnum" Version="7.0.0" />
<PackageVersion Include="Ardalis.Specification" Version="7.0.0" />
<PackageVersion Include="Ardalis.Specification.EntityFrameworkCore" Version="7.0.0" />
<PackageVersion Include="Autofac" Version="7.0.1" />
<PackageVersion Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
<PackageVersion Include="FastEndpoints" Version="5.14.0" />
<PackageVersion Include="FastEndpoints.ApiExplorer" Version="2.1.0" />
<PackageVersion Include="FastEndpoints.Swagger" Version="5.10.0" />
<PackageVersion Include="FastEndpoints.Swagger.Swashbuckle" Version="2.1.0" />
<PackageVersion Include="FastEndpoints" Version="5.15.0" />
<PackageVersion Include="FastEndpoints.ApiExplorer" Version="2.2.0" />
<PackageVersion Include="FastEndpoints.Swagger" Version="5.15.0" />
<PackageVersion Include="FastEndpoints.Swagger.Swashbuckle" Version="2.2.0" />
<PackageVersion Include="FluentAssertions" Version="6.11.0" />
<PackageVersion Include="MediatR" Version="12.1.1" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.9" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.9" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.9" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.9" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.9" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.9" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageVersion Include="MediatR.Extensions.Autofac.DependencyInjection" Version="11.1.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.10" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.10" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.10" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.10" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.10" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.10" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.10" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.7.0" />
<PackageVersion Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.8" />
<PackageVersion Include="Moq" Version="4.18.4" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="NSubstitute" Version="5.0.0" />
<PackageVersion Include="ReportGenerator" Version="5.1.23" />
<PackageVersion Include="Serilog.AspNetCore" Version="7.0.0" />
<PackageVersion Include="Serilog.Sinks.ApplicationInsights" Version="4.0.1-dev-00040" />
Expand Down
Loading

0 comments on commit 6e0742b

Please sign in to comment.