From d1a7036a85a0b481ddb2a7271bc4a0ec6f1400fa Mon Sep 17 00:00:00 2001 From: Alex Klaus Date: Mon, 1 Jan 2024 12:42:47 +1000 Subject: [PATCH] Moved `AddAndConfigureDomainServices()` to `DataBase` proj --- .../Configuration/AddAndConfigureDbContext.cs | 4 +--- Domain/Configuration/AddAndConfigureDomainServices.cs | 3 ++- Domain/Domain.csproj | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) rename {Domain => Database}/Configuration/AddAndConfigureDbContext.cs (94%) diff --git a/Domain/Configuration/AddAndConfigureDbContext.cs b/Database/Configuration/AddAndConfigureDbContext.cs similarity index 94% rename from Domain/Configuration/AddAndConfigureDbContext.cs rename to Database/Configuration/AddAndConfigureDbContext.cs index 7969e18..dc96e61 100644 --- a/Domain/Configuration/AddAndConfigureDbContext.cs +++ b/Database/Configuration/AddAndConfigureDbContext.cs @@ -1,9 +1,7 @@ -using AK.DbSample.Database; - using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; -namespace AK.DbSample.Domain.Configuration; +namespace AK.DbSample.Database.Configuration; public static partial class ServiceCollectionExtensions { diff --git a/Domain/Configuration/AddAndConfigureDomainServices.cs b/Domain/Configuration/AddAndConfigureDomainServices.cs index 1a95404..07a3e29 100644 --- a/Domain/Configuration/AddAndConfigureDomainServices.cs +++ b/Domain/Configuration/AddAndConfigureDomainServices.cs @@ -1,3 +1,4 @@ +using AK.DbSample.Database.Configuration; using AK.DbSample.Domain.Helpers; using AK.DbSample.Domain.Services; @@ -5,7 +6,7 @@ namespace AK.DbSample.Domain.Configuration; -public static partial class ServiceCollectionExtensions +public static class ServiceCollectionExtensions { public static IServiceCollection AddAndConfigureDomainServices(this IServiceCollection services, (string? connectionString, bool registerMigrationsAssembly)? configureDatabase = null) { diff --git a/Domain/Domain.csproj b/Domain/Domain.csproj index 19d9d4c..62dcdd2 100644 --- a/Domain/Domain.csproj +++ b/Domain/Domain.csproj @@ -14,7 +14,6 @@ -