Skip to content

Commit

Permalink
refactor: fix dependecy issue on Feature and refactor domain layer
Browse files Browse the repository at this point in the history
  • Loading branch information
nadirbad committed Jan 15, 2024
1 parent 2be43dd commit 2ad4532
Show file tree
Hide file tree
Showing 23 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion src/Application/Common/Interfaces/ICsvFileBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using VerticalSliceArchitecture.Application.Features.TodoLists;
using VerticalSliceArchitecture.Application.Domain.Todos;

namespace VerticalSliceArchitecture.Application.Common.Interfaces;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using VerticalSliceArchitecture.Application.Common;
using VerticalSliceArchitecture.Application.Common.Mappings;

namespace VerticalSliceArchitecture.Application.Entities;
namespace VerticalSliceArchitecture.Application.Domain.Todos;

public class TodoItem : AuditableEntity, IHasDomainEvent
{
Expand Down Expand Up @@ -53,3 +54,10 @@ public enum PriorityLevel
Medium = 2,
High = 3
}

public class TodoItemRecord : IMapFrom<TodoItem>
{
public string? Title { get; set; }

public bool Done { get; set; }
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using VerticalSliceArchitecture.Application.Common;
using VerticalSliceArchitecture.Application.ValueObjects;
using VerticalSliceArchitecture.Application.Domain.ValueObjects;

namespace VerticalSliceArchitecture.Application.Entities;
namespace VerticalSliceArchitecture.Application.Domain.Todos;

public class TodoList : AuditableEntity
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using VerticalSliceArchitecture.Application.Common;
using VerticalSliceArchitecture.Application.Common.Exceptions;

namespace VerticalSliceArchitecture.Application.ValueObjects;
namespace VerticalSliceArchitecture.Application.Domain.ValueObjects;

public class Colour : ValueObject
{
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Features/TodoItems/CreateTodoItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Microsoft.AspNetCore.Mvc;

using VerticalSliceArchitecture.Application.Common;
using VerticalSliceArchitecture.Application.Entities;
using VerticalSliceArchitecture.Application.Domain.Todos;
using VerticalSliceArchitecture.Application.Infrastructure.Persistence;

namespace VerticalSliceArchitecture.Application.Features.TodoItems;
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Features/TodoItems/DeleteTodoItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using VerticalSliceArchitecture.Application.Common;
using VerticalSliceArchitecture.Application.Common.Exceptions;
using VerticalSliceArchitecture.Application.Entities;
using VerticalSliceArchitecture.Application.Domain.Todos;
using VerticalSliceArchitecture.Application.Infrastructure.Persistence;

namespace VerticalSliceArchitecture.Application.Features.TodoItems;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Microsoft.Extensions.Logging;

using VerticalSliceArchitecture.Application.Common.Models;
using VerticalSliceArchitecture.Application.Entities;
using VerticalSliceArchitecture.Application.Domain.Todos;

namespace VerticalSliceArchitecture.Application.Features.TodoItems.EventHandlers;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using VerticalSliceArchitecture.Application.Common;
using VerticalSliceArchitecture.Application.Common.Mappings;
using VerticalSliceArchitecture.Application.Common.Models;
using VerticalSliceArchitecture.Application.Entities;
using VerticalSliceArchitecture.Application.Domain.Todos;
using VerticalSliceArchitecture.Application.Infrastructure.Persistence;

namespace VerticalSliceArchitecture.Application.Features.TodoItems;
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Features/TodoItems/UpdateTodoItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

using VerticalSliceArchitecture.Application.Common;
using VerticalSliceArchitecture.Application.Common.Exceptions;
using VerticalSliceArchitecture.Application.Entities;
using VerticalSliceArchitecture.Application.Domain.Todos;
using VerticalSliceArchitecture.Application.Infrastructure.Persistence;

namespace VerticalSliceArchitecture.Application.Features.TodoItems;
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Features/TodoItems/UpdateTodoItemDetail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using VerticalSliceArchitecture.Application.Common;
using VerticalSliceArchitecture.Application.Common.Exceptions;
using VerticalSliceArchitecture.Application.Entities;
using VerticalSliceArchitecture.Application.Domain.Todos;
using VerticalSliceArchitecture.Application.Infrastructure.Persistence;

namespace VerticalSliceArchitecture.Application.Features.TodoItems;
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Features/TodoLists/CreateTodoList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.EntityFrameworkCore;

using VerticalSliceArchitecture.Application.Common;
using VerticalSliceArchitecture.Application.Entities;
using VerticalSliceArchitecture.Application.Domain.Todos;
using VerticalSliceArchitecture.Application.Infrastructure.Persistence;

namespace VerticalSliceArchitecture.Application.Features.TodoLists;
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Features/TodoLists/DeleteTodoList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

using VerticalSliceArchitecture.Application.Common;
using VerticalSliceArchitecture.Application.Common.Exceptions;
using VerticalSliceArchitecture.Application.Entities;
using VerticalSliceArchitecture.Application.Domain.Todos;
using VerticalSliceArchitecture.Application.Infrastructure.Persistence;

namespace VerticalSliceArchitecture.Application.Features.TodoLists;
Expand Down
10 changes: 1 addition & 9 deletions src/Application/Features/TodoLists/ExportTodos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

using VerticalSliceArchitecture.Application.Common;
using VerticalSliceArchitecture.Application.Common.Interfaces;
using VerticalSliceArchitecture.Application.Common.Mappings;
using VerticalSliceArchitecture.Application.Entities;
using VerticalSliceArchitecture.Application.Domain.Todos;
using VerticalSliceArchitecture.Application.Infrastructure.Persistence;

namespace VerticalSliceArchitecture.Application.Features.TodoLists;
Expand Down Expand Up @@ -74,10 +73,3 @@ public async Task<ExportTodosVm> Handle(ExportTodosQuery request, CancellationTo
return vm;
}
}

public class TodoItemRecord : IMapFrom<TodoItem>
{
public string? Title { get; set; }

public bool Done { get; set; }
}
2 changes: 1 addition & 1 deletion src/Application/Features/TodoLists/GetTodos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

using VerticalSliceArchitecture.Application.Common;
using VerticalSliceArchitecture.Application.Common.Mappings;
using VerticalSliceArchitecture.Application.Entities;
using VerticalSliceArchitecture.Application.Domain.Todos;
using VerticalSliceArchitecture.Application.Infrastructure.Persistence;

namespace VerticalSliceArchitecture.Application.Features.TodoLists;
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Features/TodoLists/UpdateTodoList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

using VerticalSliceArchitecture.Application.Common;
using VerticalSliceArchitecture.Application.Common.Exceptions;
using VerticalSliceArchitecture.Application.Entities;
using VerticalSliceArchitecture.Application.Domain.Todos;
using VerticalSliceArchitecture.Application.Infrastructure.Persistence;

namespace VerticalSliceArchitecture.Application.Features.TodoLists;
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Infrastructure/Files/CsvFileBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using CsvHelper;

using VerticalSliceArchitecture.Application.Common.Interfaces;
using VerticalSliceArchitecture.Application.Features.TodoLists;
using VerticalSliceArchitecture.Application.Domain.Todos;
using VerticalSliceArchitecture.Application.Infrastructure.Files.Maps;

namespace VerticalSliceArchitecture.Application.Infrastructure.Files;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using CsvHelper.Configuration;

using VerticalSliceArchitecture.Application.Features.TodoLists;
using VerticalSliceArchitecture.Application.Domain.Todos;

namespace VerticalSliceArchitecture.Application.Infrastructure.Files.Maps;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

using VerticalSliceArchitecture.Application.Common;
using VerticalSliceArchitecture.Application.Common.Interfaces;
using VerticalSliceArchitecture.Application.Entities;
using VerticalSliceArchitecture.Application.Domain.Todos;

namespace VerticalSliceArchitecture.Application.Infrastructure.Persistence;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using VerticalSliceArchitecture.Application.Entities;
using VerticalSliceArchitecture.Application.ValueObjects;
using VerticalSliceArchitecture.Application.Domain.Todos;
using VerticalSliceArchitecture.Application.Domain.ValueObjects;

namespace VerticalSliceArchitecture.Application.Infrastructure.Persistence;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

using VerticalSliceArchitecture.Application.Entities;
using VerticalSliceArchitecture.Application.Domain.Todos;

namespace VerticalSliceArchitecture.Application.Infrastructure.Persistence.Configurations;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

using VerticalSliceArchitecture.Application.Entities;
using VerticalSliceArchitecture.Application.Domain.Todos;

namespace VerticalSliceArchitecture.Application.Infrastructure.Persistence.Configurations;

Expand Down
4 changes: 2 additions & 2 deletions tests/Application.UnitTests/Common/Mappings/MappingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using AutoMapper;
using VerticalSliceArchitecture.Application.Common.Mappings;
using NUnit.Framework;
using VerticalSliceArchitecture.Application.Entities;
using VerticalSliceArchitecture.Application.Domain.Todos;
using VerticalSliceArchitecture.Application.Features.TodoLists;

namespace VerticalSliceArchitecture.Application.UnitTests.Common.Mappings;
Expand All @@ -14,7 +14,7 @@ public class MappingTests

public MappingTests()
{
_configuration = new MapperConfiguration(config =>
_configuration = new MapperConfiguration(config =>
config.AddProfile<MappingProfile>());

_mapper = _configuration.CreateMapper();
Expand Down
2 changes: 1 addition & 1 deletion tests/Application.UnitTests/ValueObjects/ColourTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using NUnit.Framework;

using VerticalSliceArchitecture.Application.Common.Exceptions;
using VerticalSliceArchitecture.Application.ValueObjects;
using VerticalSliceArchitecture.Application.Domain.ValueObjects;

namespace VerticalSliceArchitecture.Application.UnitTests.ValueObjects;

Expand Down

0 comments on commit 2ad4532

Please sign in to comment.