-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added assembly name and namespaces to all libraries * Fixed up namespaces * Trying to get integration tests to work * Added nuget nuspec file * Added GitHub package workflow * Added read me instructions for publishing the nuget package * Allow manual workflow trigger * Update action trigger * Remove skip duplicate package * Add manual trigger back * Updated version * Fixed build * Update package version * Reverted build pipeline settings * Removed angular from nuspec * Update nuspec description Co-authored-by: William Liebenberg <[email protected]> * Update src/Application/Application.csproj Co-authored-by: William Liebenberg <[email protected]> * Update src/Application/Application.csproj Co-authored-by: William Liebenberg <[email protected]> * Update src/Application/Common/Behaviours/LoggingBehaviour.cs Co-authored-by: William Liebenberg <[email protected]> * Added SSW to namespaces and assembly names --------- Co-authored-by: William Liebenberg <[email protected]>
- Loading branch information
1 parent
aafbadf
commit 591fdc5
Showing
64 changed files
with
380 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Package | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'CleanArchitecture.nuspec' | ||
jobs: | ||
publish: | ||
name: Publish to NuGet.org | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: nuget/setup-nuget@v1 | ||
with: | ||
nuget-version: '6.x' | ||
|
||
- name: Create the package | ||
run: nuget pack CleanArchitecture.nuspec -NoDefaultExcludes | ||
|
||
- name: Publish the package | ||
run: nuget push *.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/template", | ||
"author": "SSW", | ||
"classifications": [ | ||
"Web", | ||
"SPA", | ||
"API", | ||
".NET", | ||
"ASP.NET Core", | ||
"EF Core", | ||
"SSW", | ||
"Clean Architecture" | ||
], | ||
"name": "SSW Clean Architecture Solution", | ||
"description": "", | ||
"identity": "SSW.Clean.Architecture.Solution.CSharp", | ||
"groupIdentity": "SSW.Clean.Architecture.Solution", | ||
"shortName": "ssw-ca", | ||
"tags": { | ||
"language": "C#", | ||
"type": "project" | ||
}, | ||
"sourceName": "SSW.CleanArchitecture", | ||
"preferNameDirectory": true, | ||
"sources": [ | ||
{ | ||
"source": "./", | ||
"target": "./", | ||
"exclude": [ | ||
"README.md", | ||
"**/[Bb]in/**", | ||
"**/[Oo]bj/**", | ||
".template.config/**/*", | ||
".vs/**/*", | ||
"**/*.filelist", | ||
"**/*.user", | ||
"**/*.lock.json", | ||
"**/.git/**", | ||
"*.nuspec", | ||
"**/node_modules/**" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd"> | ||
<metadata> | ||
|
||
<id>SSW.CleanArchitecture.Template</id> | ||
<version>0.2.3</version> | ||
<title>SSW Clean Architecture Template</title> | ||
<authors>SSW</authors> | ||
<description>SSW Clean Architecture Solution Template for .NET.</description> | ||
<summary> | ||
This is a solution template for creating a WebAPI with ASP.NET Core following the principles of Clean Architecture. | ||
</summary> | ||
<releaseNotes> | ||
</releaseNotes> | ||
|
||
<projectUrl>https://github.com/SSWConsulting/CleanArchitectureV2</projectUrl> | ||
<repository type="git" url="https://github.com/SSWConsulting/CleanArchitectureV2.git" branch="main" /> | ||
|
||
<license type="expression">MIT</license> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<tags>clean-architecture project template csharp dotnet ssw</tags> | ||
<readme>README.md</readme> | ||
|
||
<packageTypes> | ||
<packageType name="Template" /> | ||
</packageTypes> | ||
|
||
</metadata> | ||
|
||
<files> | ||
<file src="README.md" /> | ||
<file src=".\**" target="content" exclude="**\bin\**;**\obj\**;**\.vs\**;**\.vscode\**;**\.git\**;**\.github\**;**\LICENSE;" /> | ||
</files> | ||
|
||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Application/Common/Behaviours/UnhandledExceptionBehaviour.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
src/Application/Features/TodoItems/Commands/CreateTodoItem/CreateTodoItemCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
src/Application/Features/TodoItems/Commands/CreateTodoItem/CreateTodoItemMapping.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
namespace Application.Features.TodoItems.Commands.CreateTodoItem; | ||
using SSW.CleanArchitecture.Domain.Entities; | ||
|
||
namespace SSW.CleanArchitecture.Application.Features.TodoItems.Commands.CreateTodoItem; | ||
|
||
public class CreateTodoItemMapping : Profile | ||
{ | ||
public CreateTodoItemMapping() | ||
{ | ||
CreateMap<CreateTodoItemCommand, Domain.Entities.TodoItem>(); | ||
CreateMap<CreateTodoItemCommand, TodoItem>(); | ||
} | ||
} |
7 changes: 3 additions & 4 deletions
7
src/Application/Features/TodoItems/EventHandlers/TodoItemCreatedEventHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
src/Application/Features/TodoItems/Queries/GetAllTodoItems/GetAllTodoItemsMapping.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
namespace Application.Features.TodoItems.Queries.GetAllTodoItems; | ||
using SSW.CleanArchitecture.Domain.Entities; | ||
|
||
namespace SSW.CleanArchitecture.Application.Features.TodoItems.Queries.GetAllTodoItems; | ||
|
||
public class GetAllTodoItemsMapping : Profile | ||
{ | ||
public GetAllTodoItemsMapping() | ||
{ | ||
CreateMap<Domain.Entities.TodoItem, TodoItemDto>() | ||
CreateMap<TodoItem, TodoItemDto>() | ||
.ForMember(d => d.Id, opt => opt.MapFrom(s => s.Id.Value)); | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
src/Application/Features/TodoItems/Queries/GetAllTodoItems/GetAllTodoItemsQuery.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Application/Features/TodoItems/Queries/GetAllTodoItems/TodoItemDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/Application/Features/TodoItems/Specifications/AllTodoItemSpec.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/Application/Features/TodoItems/Specifications/TodoItemByTitleSpec.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
using MediatR; | ||
|
||
namespace Domain.Common; | ||
namespace SSW.CleanArchitecture.Domain.Common; | ||
|
||
public record BaseEvent : INotification; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace Domain.Common; | ||
namespace SSW.CleanArchitecture.Domain.Common; | ||
|
||
public interface IDomainEvents | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace Domain.Enum; | ||
namespace SSW.CleanArchitecture.Domain.Enum; | ||
|
||
public enum PriorityLevel | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
using Domain.Entities; | ||
using SSW.CleanArchitecture.Domain.Common; | ||
using SSW.CleanArchitecture.Domain.Entities; | ||
|
||
namespace Domain.Events; | ||
namespace SSW.CleanArchitecture.Domain.Events; | ||
|
||
public record TodoItemCreatedEvent(TodoItem Item) : BaseEvent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
global using Domain.Common; | ||
global using Domain.Enum; | ||
global using SSW.CleanArchitecture.Domain.Common; | ||
global using SSW.CleanArchitecture.Domain.Enum; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.