diff --git a/src/SM.Medication.Application/GlobalUsings.cs b/src/SM.Medication.Application/GlobalUsings.cs new file mode 100644 index 0000000..d292cb7 --- /dev/null +++ b/src/SM.Medication.Application/GlobalUsings.cs @@ -0,0 +1 @@ +global using SM.Medication.Domain.DTO; diff --git a/src/SM.Medication.Application/Handlers/MedicationHandler.cs b/src/SM.Medication.Application/Handlers/MedicationHandler.cs index 3d63410..193671b 100644 --- a/src/SM.Medication.Application/Handlers/MedicationHandler.cs +++ b/src/SM.Medication.Application/Handlers/MedicationHandler.cs @@ -1,6 +1,5 @@ using MapsterMapper; using SM.Medication.Application.Interfaces; -using SM.Medication.Domain.DTO; using SM.Medication.Domain.Interfaces; namespace SM.Medication.Application.Handlers; @@ -12,6 +11,6 @@ public class MedicationHandler( public async Task> Handle() { var medications = await medicationRepository.GetAll(); - return mapper.Map>(medications); + return mapper.Map>(medications); } } diff --git a/src/SM.Medication.Application/Interfaces/IMedicationHandler.cs b/src/SM.Medication.Application/Interfaces/IMedicationHandler.cs index df5fdbc..19147ae 100644 --- a/src/SM.Medication.Application/Interfaces/IMedicationHandler.cs +++ b/src/SM.Medication.Application/Interfaces/IMedicationHandler.cs @@ -1,5 +1,3 @@ -using SM.Medication.Domain.DTO; - namespace SM.Medication.Application.Interfaces; public interface IMedicationHandler { diff --git a/src/SM.Medication.Auth/Extensions/SmartMedAuthExtensions.cs b/src/SM.Medication.Auth/Extensions/SmartMedAuthExtensions.cs index 84e0798..4b9ef6f 100644 --- a/src/SM.Medication.Auth/Extensions/SmartMedAuthExtensions.cs +++ b/src/SM.Medication.Auth/Extensions/SmartMedAuthExtensions.cs @@ -1,4 +1,3 @@ -using Microsoft.AspNetCore.Http; namespace SM.Medication.Auth.Extensions; public static class SmartMedAuthExtensions diff --git a/src/SM.Medication.Auth/GlobalUsings.cs b/src/SM.Medication.Auth/GlobalUsings.cs new file mode 100644 index 0000000..91d9799 --- /dev/null +++ b/src/SM.Medication.Auth/GlobalUsings.cs @@ -0,0 +1,2 @@ +global using Microsoft.AspNetCore.Authentication; +global using Microsoft.AspNetCore.Http; diff --git a/src/SM.Medication.Auth/Options/SMAuthSchemeOptions.cs b/src/SM.Medication.Auth/Options/SMAuthSchemeOptions.cs index e153faa..72bd8ac 100644 --- a/src/SM.Medication.Auth/Options/SMAuthSchemeOptions.cs +++ b/src/SM.Medication.Auth/Options/SMAuthSchemeOptions.cs @@ -1,5 +1,3 @@ -using Microsoft.AspNetCore.Authentication; - namespace SM.Medication.Auth.Options; public class SMAuthSchemeOptions : AuthenticationSchemeOptions { diff --git a/src/SM.Medication.Auth/SmartMedAuthenticationHandler.cs b/src/SM.Medication.Auth/SmartMedAuthenticationHandler.cs index 4127858..ae4300d 100644 --- a/src/SM.Medication.Auth/SmartMedAuthenticationHandler.cs +++ b/src/SM.Medication.Auth/SmartMedAuthenticationHandler.cs @@ -3,8 +3,6 @@ using System.Text.Encodings.Web; using System.Text.Json; using System.Text.RegularExpressions; -using Microsoft.AspNetCore.Authentication; -using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Extensions.Primitives; diff --git a/src/SM.Medication.Infrastructure/GlobalUsings.cs b/src/SM.Medication.Infrastructure/GlobalUsings.cs new file mode 100644 index 0000000..832e011 --- /dev/null +++ b/src/SM.Medication.Infrastructure/GlobalUsings.cs @@ -0,0 +1,2 @@ +global using Microsoft.EntityFrameworkCore; +global using Microsoft.EntityFrameworkCore.Infrastructure; diff --git a/src/SM.Medication.Infrastructure/Mapping/MedicationMapping.cs b/src/SM.Medication.Infrastructure/Mapping/MedicationMapping.cs index f1efa32..0ec6117 100644 --- a/src/SM.Medication.Infrastructure/Mapping/MedicationMapping.cs +++ b/src/SM.Medication.Infrastructure/Mapping/MedicationMapping.cs @@ -1,4 +1,3 @@ -using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace SM.Medication.Infrastructure.Mapping; diff --git a/src/SM.Medication.Infrastructure/Migrations/20240726082831_InitialDataBase.cs b/src/SM.Medication.Infrastructure/Migrations/20240726082831_InitialDataBase.cs index 3141624..7b679bc 100644 --- a/src/SM.Medication.Infrastructure/Migrations/20240726082831_InitialDataBase.cs +++ b/src/SM.Medication.Infrastructure/Migrations/20240726082831_InitialDataBase.cs @@ -1,4 +1,3 @@ -using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/SM.Medication.Infrastructure/Persistence/SmartMedMedicationDbContext.cs b/src/SM.Medication.Infrastructure/Persistence/SmartMedMedicationDbContext.cs index dad6143..abdaa8e 100644 --- a/src/SM.Medication.Infrastructure/Persistence/SmartMedMedicationDbContext.cs +++ b/src/SM.Medication.Infrastructure/Persistence/SmartMedMedicationDbContext.cs @@ -1,5 +1,3 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage; namespace SM.Medication.Infrastructure.Persistence; diff --git a/src/SM.Medication.Infrastructure/Services/Repositories/MedicationRepository.cs b/src/SM.Medication.Infrastructure/Services/Repositories/MedicationRepository.cs index 9dd6769..d7f50b5 100644 --- a/src/SM.Medication.Infrastructure/Services/Repositories/MedicationRepository.cs +++ b/src/SM.Medication.Infrastructure/Services/Repositories/MedicationRepository.cs @@ -1,4 +1,3 @@ -using Microsoft.EntityFrameworkCore; using SM.Medication.Domain.Interfaces; using SM.Medication.Infrastructure.Persistence;