Skip to content

Commit

Permalink
Remove redundant application layer
Browse files Browse the repository at this point in the history
  • Loading branch information
Typiqally committed Oct 27, 2021
1 parent eaf58f3 commit a0bce73
Show file tree
Hide file tree
Showing 16 changed files with 12 additions and 170 deletions.
15 changes: 0 additions & 15 deletions Typiqally.Application.Abstractions/Dtos/WeatherForecastDto.cs

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions Typiqally.Application.IoC/Typiqally.Application.IoC.csproj

This file was deleted.

15 changes: 0 additions & 15 deletions Typiqally.Application/Profiles/WeatherForecastDtoMappingProfile.cs

This file was deleted.

27 changes: 0 additions & 27 deletions Typiqally.Application/Services/WeatherForecastService.cs

This file was deleted.

17 changes: 0 additions & 17 deletions Typiqally.Application/Typiqally.Application.csproj

This file was deleted.

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

namespace Typiqally.Domain.Abstractions.Services
{
public interface IWeatherForecastDomainService
public interface IWeatherForecastService
{
Task<IEnumerable<WeatherForecast>> GetLatestForecastsAsync();
}
Expand Down
2 changes: 1 addition & 1 deletion Typiqally.Domain.IoC/DomainServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static IServiceCollection AddDomain(this IServiceCollection services, ICo
{
services.AddPersistence(configuration);

services.AddScoped<IWeatherForecastDomainService, WeatherForecastDomainService>();
services.AddScoped<IWeatherForecastService, WeatherForecastService>();

// AutoMapper profiles
services.AddAutoMapper(config =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

namespace Typiqally.Domain.Services
{
public class WeatherForecastDomainService : IWeatherForecastDomainService
public class WeatherForecastService : IWeatherForecastService
{
private readonly IMapper _mapper;
private readonly IWeatherForecastRepository _repository;

public WeatherForecastDomainService(IMapper mapper, IWeatherForecastRepository repository)
public WeatherForecastService(IMapper mapper, IWeatherForecastRepository repository)
{
_mapper = mapper;
_repository = repository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Threading.Tasks;
using AutoMapper;
using Microsoft.AspNetCore.Mvc;
using Typiqally.Application.Abstractions.Services;
using Typiqally.Domain.Abstractions.Services;
using Typiqally.Presentation.WebApi.ViewModels;

namespace Typiqally.Presentation.WebApi.Controllers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using AutoMapper;
using Typiqally.Application.Abstractions.Dtos;
using Typiqally.Domain.Abstractions.Models;
using Typiqally.Presentation.WebApi.ViewModels;

namespace Typiqally.Presentation.WebApi.Profiles
Expand All @@ -8,8 +8,8 @@ public class WeatherForecastViewModelMappingProfile : Profile
{
public WeatherForecastViewModelMappingProfile()
{
CreateMap<WeatherForecastViewModel, WeatherForecastDto>();
CreateMap<WeatherForecastDto, WeatherForecastViewModel>();
CreateMap<WeatherForecastViewModel, WeatherForecast>();
CreateMap<WeatherForecast, WeatherForecastViewModel>();
}
}
}
6 changes: 3 additions & 3 deletions Typiqally.Presentation.WebApi/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.OpenApi.Models;
using Typiqally.Application.IoC;
using Typiqally.Domain.IoC;
using Typiqally.Presentation.WebApi.Profiles;

namespace Typiqally.Presentation.WebApi
Expand All @@ -21,15 +21,15 @@ public Startup(IConfiguration configuration)
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddDomain(Configuration);

services.AddControllers();
services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new OpenApiInfo {Title = "Typiqally.Presentation.WebApi", Version = "v1"}); });

services.AddAutoMapper(config =>
{
config.AddProfile<WeatherForecastViewModelMappingProfile>();
});

services.AddApplication(Configuration);
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Typiqally.Application.IoC\Typiqally.Application.IoC.csproj" />
<ProjectReference Include="..\Typiqally.Domain.IoC\Typiqally.Domain.IoC.csproj" />
</ItemGroup>

</Project>
18 changes: 0 additions & 18 deletions Typiqally.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Typiqally.Domain", "Typiqal
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Typiqally.Persistence", "Typiqally.Persistence\Typiqally.Persistence.csproj", "{7045ECAC-477F-40CE-8EF4-819372427B9F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Typiqally.Application", "Typiqally.Application\Typiqally.Application.csproj", "{E53C04AE-27DF-4317-8CA0-053F58BF77A6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Typiqally.Persistence.Abstractions", "Typiqally.Persistence.Abstractions\Typiqally.Persistence.Abstractions.csproj", "{EC5CA443-31B6-4B11-A729-BD40DC8A363A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Typiqally.Domain.Abstractions", "Typiqally.Domain.Abstractions\Typiqally.Domain.Abstractions.csproj", "{47EDD859-9673-48DD-9FE5-5FD2D173AB62}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Typiqally.Application.Abstractions", "Typiqally.Application.Abstractions\Typiqally.Application.Abstractions.csproj", "{8DE7B876-0CEE-4BBF-A9E9-4A374D99C2CC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Typiqally.Domain.IoC", "Typiqally.Domain.IoC\Typiqally.Domain.IoC.csproj", "{D5DA7DF8-443D-4F10-834B-2BD7A9E7CE00}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Typiqally.Application.IoC", "Typiqally.Application.IoC\Typiqally.Application.IoC.csproj", "{DB258413-4703-4BBD-96EE-1403EFDE2993}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Typiqally.Persistence.IoC", "Typiqally.Persistence.IoC\Typiqally.Persistence.IoC.csproj", "{BC228A9C-23BF-4A87-8958-BB8BF9B1685C}"
EndProject
Global
Expand All @@ -38,10 +32,6 @@ Global
{7045ECAC-477F-40CE-8EF4-819372427B9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7045ECAC-477F-40CE-8EF4-819372427B9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7045ECAC-477F-40CE-8EF4-819372427B9F}.Release|Any CPU.Build.0 = Release|Any CPU
{E53C04AE-27DF-4317-8CA0-053F58BF77A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E53C04AE-27DF-4317-8CA0-053F58BF77A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E53C04AE-27DF-4317-8CA0-053F58BF77A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E53C04AE-27DF-4317-8CA0-053F58BF77A6}.Release|Any CPU.Build.0 = Release|Any CPU
{EC5CA443-31B6-4B11-A729-BD40DC8A363A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC5CA443-31B6-4B11-A729-BD40DC8A363A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC5CA443-31B6-4B11-A729-BD40DC8A363A}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -50,18 +40,10 @@ Global
{47EDD859-9673-48DD-9FE5-5FD2D173AB62}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47EDD859-9673-48DD-9FE5-5FD2D173AB62}.Release|Any CPU.ActiveCfg = Release|Any CPU
{47EDD859-9673-48DD-9FE5-5FD2D173AB62}.Release|Any CPU.Build.0 = Release|Any CPU
{8DE7B876-0CEE-4BBF-A9E9-4A374D99C2CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8DE7B876-0CEE-4BBF-A9E9-4A374D99C2CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8DE7B876-0CEE-4BBF-A9E9-4A374D99C2CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8DE7B876-0CEE-4BBF-A9E9-4A374D99C2CC}.Release|Any CPU.Build.0 = Release|Any CPU
{D5DA7DF8-443D-4F10-834B-2BD7A9E7CE00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5DA7DF8-443D-4F10-834B-2BD7A9E7CE00}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5DA7DF8-443D-4F10-834B-2BD7A9E7CE00}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5DA7DF8-443D-4F10-834B-2BD7A9E7CE00}.Release|Any CPU.Build.0 = Release|Any CPU
{DB258413-4703-4BBD-96EE-1403EFDE2993}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DB258413-4703-4BBD-96EE-1403EFDE2993}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB258413-4703-4BBD-96EE-1403EFDE2993}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DB258413-4703-4BBD-96EE-1403EFDE2993}.Release|Any CPU.Build.0 = Release|Any CPU
{BC228A9C-23BF-4A87-8958-BB8BF9B1685C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC228A9C-23BF-4A87-8958-BB8BF9B1685C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC228A9C-23BF-4A87-8958-BB8BF9B1685C}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down

0 comments on commit a0bce73

Please sign in to comment.