-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: Restructured solution architecture. * chore: Updated README.md * refactor: Removed old projects.
- Loading branch information
1 parent
3968fba
commit 90035a2
Showing
97 changed files
with
22,100 additions
and
17,904 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
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
27 changes: 0 additions & 27 deletions
27
src/Application/Categories/Commands/CreateCategory.cs/CreateCategoryCommand.cs
This file was deleted.
Oops, something went wrong.
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
6 changes: 4 additions & 2 deletions
6
...ion/Common/Security/SecurityExtensions.cs → ...n/Common/Extensions/SecurityExtensions.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
4 changes: 3 additions & 1 deletion
4
src/Domain/Entities/Category.cs → src/Application/Entities/Category.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/Domain/Common/BaseAuditableEntity.cs → ...on/Entities/Common/BaseAuditableEntity.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/Domain/Common/BaseEntity.cs → ...Application/Entities/Common/BaseEntity.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: 3 additions & 1 deletion
4
src/Domain/Entities/Task.cs → src/Application/Entities/Task.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/Domain/Entities/TaskCategory.cs → src/Application/Entities/TaskCategory.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,4 +1,4 @@ | ||
namespace Chrono.Domain.Entities; | ||
namespace Chrono.Application.Entities; | ||
|
||
public class TaskCategory | ||
{ | ||
|
4 changes: 3 additions & 1 deletion
4
src/Domain/Entities/TaskList.cs → src/Application/Entities/TaskList.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/Domain/Entities/TaskListOptions.cs → src/Application/Entities/TaskListOptions.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,4 +1,4 @@ | ||
namespace Chrono.Domain.Entities; | ||
namespace Chrono.Application.Entities; | ||
|
||
public class TaskListOptions | ||
{ | ||
|
4 changes: 3 additions & 1 deletion
4
src/Domain/Entities/User.cs → src/Application/Entities/User.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Chrono.Application.Common.Interfaces; | ||
using Chrono.Application.Entities; | ||
using MediatR; | ||
|
||
namespace Chrono.Application.Features.Categories; | ||
|
||
public record CreateCategory(string Name) : IRequest<int>; | ||
|
||
public class CreateCategoryHandler : IRequestHandler<CreateCategory, int> | ||
{ | ||
private readonly IApplicationDbContext _context; | ||
|
||
public CreateCategoryHandler(IApplicationDbContext context) | ||
{ | ||
_context = context; | ||
} | ||
|
||
public async Task<int> Handle(CreateCategory request, CancellationToken cancellationToken) | ||
{ | ||
var entity = new Category { Name = request.Name }; | ||
_context.Categories.Add(entity); | ||
|
||
await _context.SaveChangesAsync(cancellationToken); | ||
|
||
return entity.Id; | ||
} | ||
} |
Oops, something went wrong.