Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
now I can
```
mkdir try-temp.1 && cd "$_"
dotnet new clean-arch
```
  • Loading branch information
askazakov committed Nov 24, 2021
1 parent 426b34a commit 7b59d71
Show file tree
Hide file tree
Showing 337 changed files with 205 additions and 205 deletions.
2 changes: 1 addition & 1 deletion .template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"identity": "Ardalis.CleanArchitecture.Template",
"name": "ASP.NET Clean Architecture Solution",
"shortName": "clean-arch",
"sourceName": "Clean.Architecture",
"sourceName": "Clean.Architecture.1",
"preferNameDirectory": true
}
14 changes: 7 additions & 7 deletions Clean.Architecture.sln → Clean.Architecture.1.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,30 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{106AE906-507
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{B31B4797-1D9F-4288-808C-BE9A31A98C7D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.Web", "src\Clean.Architecture.Web\Clean.Architecture.Web.csproj", "{C9751CB7-4CD6-4633-A99A-4F6ADD525437}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.1.Web", "src\Clean.Architecture.1.Web\Clean.Architecture.1.Web.csproj", "{C9751CB7-4CD6-4633-A99A-4F6ADD525437}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.Core", "src\Clean.Architecture.Core\Clean.Architecture.Core.csproj", "{4548EB20-1D1B-477B-AF6E-DD55653A6583}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.1.Core", "src\Clean.Architecture.1.Core\Clean.Architecture.1.Core.csproj", "{4548EB20-1D1B-477B-AF6E-DD55653A6583}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.Infrastructure", "src\Clean.Architecture.Infrastructure\Clean.Architecture.Infrastructure.csproj", "{220361D6-9C76-4E3F-BD34-3C7B50E2CA4D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.1.Infrastructure", "src\Clean.Architecture.1.Infrastructure\Clean.Architecture.1.Infrastructure.csproj", "{220361D6-9C76-4E3F-BD34-3C7B50E2CA4D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{250F283E-FE2F-4BBD-9E63-A2265B84E23F}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.FunctionalTests", "tests\Clean.Architecture.FunctionalTests\Clean.Architecture.FunctionalTests.csproj", "{7D84EFEE-A7D9-44AD-A0A3-38EC7882D94C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.1.FunctionalTests", "tests\Clean.Architecture.1.FunctionalTests\Clean.Architecture.1.FunctionalTests.csproj", "{7D84EFEE-A7D9-44AD-A0A3-38EC7882D94C}"
ProjectSection(ProjectDependencies) = postProject
{C9751CB7-4CD6-4633-A99A-4F6ADD525437} = {C9751CB7-4CD6-4633-A99A-4F6ADD525437}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.IntegrationTests", "tests\Clean.Architecture.IntegrationTests\Clean.Architecture.IntegrationTests.csproj", "{0776DC14-9000-47A4-A3F4-ECBCF8CEBC17}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.1.IntegrationTests", "tests\Clean.Architecture.1.IntegrationTests\Clean.Architecture.1.IntegrationTests.csproj", "{0776DC14-9000-47A4-A3F4-ECBCF8CEBC17}"
ProjectSection(ProjectDependencies) = postProject
{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}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.1.SharedKernel", "src\Clean.Architecture.1.SharedKernel\Clean.Architecture.1.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}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clean.Architecture.1.UnitTests", "tests\Clean.Architecture.1.UnitTests\Clean.Architecture.1.UnitTests.csproj", "{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Clean.Architecture.SharedKernel\Clean.Architecture.SharedKernel.csproj" />
<ProjectReference Include="..\Clean.Architecture.1.SharedKernel\Clean.Architecture.1.SharedKernel.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Autofac;
using Clean.Architecture.Core.Interfaces;
using Clean.Architecture.Core.Services;
using Clean.Architecture._1.Core.Interfaces;
using Clean.Architecture._1.Core.Services;

namespace Clean.Architecture.Core;
namespace Clean.Architecture._1.Core;

public class DefaultCoreModule : Module
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Threading.Tasks;

namespace Clean.Architecture.Core.Interfaces;
namespace Clean.Architecture._1.Core.Interfaces;

public interface IEmailSender
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Ardalis.Result;
using Clean.Architecture.Core.ProjectAggregate;
using Clean.Architecture._1.Core.ProjectAggregate;

namespace Clean.Architecture.Core.Interfaces;
namespace Clean.Architecture._1.Core.Interfaces;

public interface IToDoItemSearchService
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Clean.Architecture.SharedKernel;
using Clean.Architecture._1.SharedKernel;

namespace Clean.Architecture.Core.ProjectAggregate.Events;
namespace Clean.Architecture._1.Core.ProjectAggregate.Events;

public class NewItemAddedEvent : BaseDomainEvent
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Clean.Architecture.Core.ProjectAggregate;
using Clean.Architecture.SharedKernel;
using Clean.Architecture._1.Core.ProjectAggregate;
using Clean.Architecture._1.SharedKernel;

namespace Clean.Architecture.Core.ProjectAggregate.Events;
namespace Clean.Architecture._1.Core.ProjectAggregate.Events;

public class ToDoItemCompletedEvent : BaseDomainEvent
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Threading;
using System.Threading.Tasks;
using Ardalis.GuardClauses;
using Clean.Architecture.Core.Interfaces;
using Clean.Architecture.Core.ProjectAggregate.Events;
using Clean.Architecture._1.Core.Interfaces;
using Clean.Architecture._1.Core.ProjectAggregate.Events;
using MediatR;

namespace Clean.Architecture.Core.ProjectAggregate.Handlers;
namespace Clean.Architecture._1.Core.ProjectAggregate.Handlers;

public class ItemCompletedEmailNotificationHandler : INotificationHandler<ToDoItemCompletedEvent>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Ardalis.GuardClauses;
using Clean.Architecture.Core.ProjectAggregate.Events;
using Clean.Architecture.SharedKernel;
using Clean.Architecture.SharedKernel.Interfaces;
using Clean.Architecture._1.Core.ProjectAggregate.Events;
using Clean.Architecture._1.SharedKernel;
using Clean.Architecture._1.SharedKernel.Interfaces;

namespace Clean.Architecture.Core.ProjectAggregate;
namespace Clean.Architecture._1.Core.ProjectAggregate;

public class Project : BaseEntity, IAggregateRoot
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Clean.Architecture._1.Core.ProjectAggregate;

public enum ProjectStatus
{
InProgress,
Complete
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Ardalis.Specification;

namespace Clean.Architecture.Core.ProjectAggregate.Specifications;
namespace Clean.Architecture._1.Core.ProjectAggregate.Specifications;

public class IncompleteItemsSearchSpec : Specification<ToDoItem>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Ardalis.Specification;

namespace Clean.Architecture.Core.ProjectAggregate.Specifications;
namespace Clean.Architecture._1.Core.ProjectAggregate.Specifications;

public class IncompleteItemsSpec : Specification<ToDoItem>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Ardalis.Specification;
using Clean.Architecture.Core.ProjectAggregate;
using Clean.Architecture._1.Core.ProjectAggregate;

namespace Clean.Architecture.Core.ProjectAggregate.Specifications;
namespace Clean.Architecture._1.Core.ProjectAggregate.Specifications;

public class ProjectByIdWithItemsSpec : Specification<Project>, ISingleResultSpecification
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Clean.Architecture.Core.ProjectAggregate.Events;
using Clean.Architecture.SharedKernel;
using Clean.Architecture._1.Core.ProjectAggregate.Events;
using Clean.Architecture._1.SharedKernel;

namespace Clean.Architecture.Core.ProjectAggregate;
namespace Clean.Architecture._1.Core.ProjectAggregate;

public class ToDoItem : BaseEntity
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Ardalis.Result;
using Clean.Architecture.Core.Interfaces;
using Clean.Architecture.Core.ProjectAggregate;
using Clean.Architecture.Core.ProjectAggregate.Specifications;
using Clean.Architecture.SharedKernel.Interfaces;
using Clean.Architecture._1.Core.Interfaces;
using Clean.Architecture._1.Core.ProjectAggregate;
using Clean.Architecture._1.Core.ProjectAggregate.Specifications;
using Clean.Architecture._1.SharedKernel.Interfaces;

namespace Clean.Architecture.Core.Services;
namespace Clean.Architecture._1.Core.Services;

public class ToDoItemSearchService : IToDoItemSearchService
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Clean.Architecture.Core\Clean.Architecture.Core.csproj" />
<ProjectReference Include="..\Clean.Architecture.SharedKernel\Clean.Architecture.SharedKernel.csproj" />
<ProjectReference Include="..\Clean.Architecture.1.Core\Clean.Architecture.1.Core.csproj" />
<ProjectReference Include="..\Clean.Architecture.1.SharedKernel\Clean.Architecture.1.SharedKernel.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Ardalis.EFCore.Extensions;
using Clean.Architecture.Core.ProjectAggregate;
using Clean.Architecture.SharedKernel;
using Clean.Architecture._1.Core.ProjectAggregate;
using Clean.Architecture._1.SharedKernel;
using MediatR;
using Microsoft.EntityFrameworkCore;

namespace Clean.Architecture.Infrastructure.Data;
namespace Clean.Architecture._1.Infrastructure.Data;

public class AppDbContext : DbContext
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Clean.Architecture.Core.ProjectAggregate;
using Clean.Architecture._1.Core.ProjectAggregate;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Clean.Architecture.Infrastructure.Data.Config;
namespace Clean.Architecture._1.Infrastructure.Data.Config;

public class ProjectConfiguration : IEntityTypeConfiguration<Project>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Clean.Architecture.Core.ProjectAggregate;
using Clean.Architecture._1.Core.ProjectAggregate;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Clean.Architecture.Infrastructure.Data.Config;
namespace Clean.Architecture._1.Infrastructure.Data.Config;

public class ToDoConfiguration : IEntityTypeConfiguration<ToDoItem>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Ardalis.Specification.EntityFrameworkCore;
using Clean.Architecture.SharedKernel.Interfaces;
using Clean.Architecture._1.SharedKernel.Interfaces;

namespace Clean.Architecture.Infrastructure.Data;
namespace Clean.Architecture._1.Infrastructure.Data;

// inherit from Ardalis.Specification type
public class EfRepository<T> : RepositoryBase<T>, IReadRepository<T>, IRepository<T> where T : class, IAggregateRoot
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using System.Reflection;
using Autofac;
using Clean.Architecture.Core.Interfaces;
using Clean.Architecture.Core.ProjectAggregate;
using Clean.Architecture.Infrastructure.Data;
using Clean.Architecture.SharedKernel.Interfaces;
using Clean.Architecture._1.Core.Interfaces;
using Clean.Architecture._1.Core.ProjectAggregate;
using Clean.Architecture._1.Infrastructure.Data;
using Clean.Architecture._1.SharedKernel.Interfaces;
using MediatR;
using MediatR.Pipeline;
using Module = Autofac.Module;

namespace Clean.Architecture.Infrastructure;
namespace Clean.Architecture._1.Infrastructure;

public class DefaultInfrastructureModule : Module
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Net.Mail;
using Clean.Architecture.Core.Interfaces;
using Clean.Architecture._1.Core.Interfaces;
using Microsoft.Extensions.Logging;

namespace Clean.Architecture.Infrastructure;
namespace Clean.Architecture._1.Infrastructure;

public class EmailSender : IEmailSender
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Clean.Architecture.Infrastructure.Data;
using Clean.Architecture._1.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;

namespace Clean.Architecture.Infrastructure;
namespace Clean.Architecture._1.Infrastructure;

public static class StartupSetup
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using MediatR;

namespace Clean.Architecture.SharedKernel;
namespace Clean.Architecture._1.SharedKernel;

public abstract class BaseDomainEvent : INotification
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Clean.Architecture.SharedKernel;
namespace Clean.Architecture._1.SharedKernel;

// This can be modified to BaseEntity<TId> to support multiple key types (e.g. Guid)
public abstract class BaseEntity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Clean.Architecture.SharedKernel;
namespace Clean.Architecture._1.SharedKernel;

// source: https://github.com/jhewlett/ValueObject
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Clean.Architecture.SharedKernel.Interfaces;
namespace Clean.Architecture._1.SharedKernel.Interfaces;

// Apply this marker interface only to aggregate root entities
// Repositories will only work with aggregate roots, not their children
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Ardalis.Specification;

namespace Clean.Architecture.SharedKernel.Interfaces;
namespace Clean.Architecture._1.SharedKernel.Interfaces;

public interface IReadRepository<T> : IReadRepositoryBase<T> where T : class, IAggregateRoot
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Ardalis.Specification;

namespace Clean.Architecture.SharedKernel.Interfaces;
namespace Clean.Architecture._1.SharedKernel.Interfaces;

// from Ardalis.Specification
public interface IRepository<T> : IRepositoryBase<T> where T : class, IAggregateRoot
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Reflection;

namespace Clean.Architecture.SharedKernel;
namespace Clean.Architecture._1.SharedKernel;

// source: https://github.com/jhewlett/ValueObject
public abstract class ValueObject : IEquatable<ValueObject>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Mvc;

namespace Clean.Architecture.Web.Api;
namespace Clean.Architecture._1.Web.Api;

/// <summary>
/// If your API controllers will use a consistent route convention and the [ApiController] attribute (they should)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;

namespace Clean.Architecture.Web.Api;
namespace Clean.Architecture._1.Web.Api;

public class MetaController : BaseApiController
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Clean.Architecture.Core.ProjectAggregate;
using Clean.Architecture.Core.ProjectAggregate.Specifications;
using Clean.Architecture.SharedKernel.Interfaces;
using Clean.Architecture.Web.ApiModels;
using Clean.Architecture._1.Core.ProjectAggregate;
using Clean.Architecture._1.Core.ProjectAggregate.Specifications;
using Clean.Architecture._1.SharedKernel.Interfaces;
using Clean.Architecture._1.Web.ApiModels;
using Microsoft.AspNetCore.Mvc;

namespace Clean.Architecture.Web.Api;
namespace Clean.Architecture._1.Web.Api;

/// <summary>
/// A sample API Controller. Consider using API Endpoints (see Endpoints folder) for a more SOLID approach to building APIs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Clean.Architecture.Web.ApiModels;
namespace Clean.Architecture._1.Web.ApiModels;

// ApiModel DTOs are used by ApiController classes and are typically kept in a side-by-side folder
public class ProjectDTO : CreateProjectDTO
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Clean.Architecture.Core.ProjectAggregate;
using Clean.Architecture._1.Core.ProjectAggregate;

namespace Clean.Architecture.Web.ApiModels;
namespace Clean.Architecture._1.Web.ApiModels;

// ApiModel DTOs are used by ApiController classes and are typically kept in a side-by-side folder
public class ToDoItemDTO
Expand Down
Loading

0 comments on commit 7b59d71

Please sign in to comment.