Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v9 with Use Cases, SharedKernel as Nuget Ref, and More #585

Merged
merged 29 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3a03bed
adding more tags
ardalis Jul 25, 2023
bbb9f46
Removing SharedKernel
ardalis Jul 25, 2023
ec0a656
Fix using statements
ardalis Jul 26, 2023
d8ce03a
Delete SharedKernel artifacts
ardalis Jul 26, 2023
373ae6a
Adding basic logging
ardalis Jul 26, 2023
eb7bc41
Adding another command and a behavior
ardalis Jul 26, 2023
053d391
Createcontributor use case done
ardalis Jul 27, 2023
51198cc
Adding queries for Contributor
ardalis Jul 27, 2023
7eab8ac
Removing more web things
ardalis Jul 27, 2023
cd9d29c
add logging isenabled check
ardalis Aug 1, 2023
38245cd
refactoring to make usecases depend on core not infra
ardalis Aug 1, 2023
6566422
Cleaning up and refactoring
ardalis Aug 1, 2023
068d4f0
Refactoring Use Cases folder structure
ardalis Aug 1, 2023
85b609a
Updating to use Fast Endpoints standard Swagger,
ardalis Aug 8, 2023
6520c78
Update now uses Mediator
ardalis Aug 8, 2023
3715ee7
Adding test and comments
ardalis Aug 8, 2023
66d9c7a
Removing excess scope
ardalis Aug 8, 2023
6cddce5
Removed Projects and ToDoItems
ardalis Aug 8, 2023
1ef9fd4
Moving from Moq to NSubstitute
ardalis Aug 10, 2023
8aa4ae6
Update template file with new version and release notes
ardalis Aug 10, 2023
357f109
WIP
ardalis Aug 10, 2023
541b37c
Sample builds; some tests failing
ardalis Aug 10, 2023
1206920
Ading MarkToDoItemCompleteHandler - in progress
ardalis Aug 10, 2023
456dd47
All tests pass
ardalis Aug 11, 2023
d3093e6
Adding XML comments
ardalis Aug 11, 2023
f4e4f64
Fixed bug in CreateToDoItem that was resulting in no Location header …
ardalis Aug 15, 2023
6fb6877
Update README
ardalis Aug 27, 2023
065dce2
Add tests for Update Contributor
ardalis Aug 28, 2023
5ad88df
adding more tests
ardalis Aug 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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