diff --git a/src/Business/Grand.Business.System/Startup/StartupApplication.cs b/src/Business/Grand.Business.System/Startup/StartupApplication.cs index 15d36533d..c9de784d9 100644 --- a/src/Business/Grand.Business.System/Startup/StartupApplication.cs +++ b/src/Business/Grand.Business.System/Startup/StartupApplication.cs @@ -1,7 +1,5 @@ -using Grand.Business.Core.Interfaces.System.Admin; -using Grand.Business.Core.Interfaces.System.Reports; +using Grand.Business.Core.Interfaces.System.Reports; using Grand.Business.Core.Interfaces.System.ScheduleTasks; -using Grand.Business.System.Services.Admin; using Grand.Business.System.Services.BackgroundServices.ScheduleTasks; using Grand.Business.System.Services.Reports; using Grand.Infrastructure; @@ -18,7 +16,6 @@ public void ConfigureServices(IServiceCollection services, IConfiguration config { RegisterReports(services); RegisterTask(services); - RegisterAdmin(services); } public void Configure(IApplicationBuilder application, IWebHostEnvironment webHostEnvironment) @@ -46,8 +43,4 @@ private void RegisterReports(IServiceCollection serviceCollection) serviceCollection.AddScoped(); serviceCollection.AddScoped(); } - private void RegisterAdmin(IServiceCollection serviceCollection) - { - serviceCollection.AddScoped(); - } } \ No newline at end of file diff --git a/src/Tests/Grand.Web.Common.Tests/Grand.Web.Common.Tests.csproj b/src/Tests/Grand.Web.Common.Tests/Grand.Web.Common.Tests.csproj index c80c8564b..a752512fd 100644 --- a/src/Tests/Grand.Web.Common.Tests/Grand.Web.Common.Tests.csproj +++ b/src/Tests/Grand.Web.Common.Tests/Grand.Web.Common.Tests.csproj @@ -26,4 +26,7 @@ PreserveNewest + + + diff --git a/src/Tests/Grand.Business.System.Tests/Services/Admin/AdminSiteMapServiceTests.cs b/src/Tests/Grand.Web.Common.Tests/Services/Admin/AdminSiteMapServiceTests.cs similarity index 89% rename from src/Tests/Grand.Business.System.Tests/Services/Admin/AdminSiteMapServiceTests.cs rename to src/Tests/Grand.Web.Common.Tests/Services/Admin/AdminSiteMapServiceTests.cs index 1dde782a9..f84f797ff 100644 --- a/src/Tests/Grand.Business.System.Tests/Services/Admin/AdminSiteMapServiceTests.cs +++ b/src/Tests/Grand.Web.Common.Tests/Services/Admin/AdminSiteMapServiceTests.cs @@ -1,12 +1,12 @@ -using Grand.Business.System.Services.Admin; -using Grand.Data; +using Grand.Data; using Grand.Domain.Admin; using Grand.Infrastructure.Caching; +using Grand.Web.Common.Menu; using MediatR; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; -namespace Grand.Business.System.Tests.Services.Admin; +namespace Grand.Web.Common.Tests.Services.Admin; [TestClass] public class AdminSiteMapServiceTests diff --git a/src/Business/Grand.Business.System/Services/Admin/AdminSiteMapService.cs b/src/Web/Grand.Web.Common/Menu/AdminSiteMapService.cs similarity index 97% rename from src/Business/Grand.Business.System/Services/Admin/AdminSiteMapService.cs rename to src/Web/Grand.Web.Common/Menu/AdminSiteMapService.cs index c093631d1..afb3c4870 100644 --- a/src/Business/Grand.Business.System/Services/Admin/AdminSiteMapService.cs +++ b/src/Web/Grand.Web.Common/Menu/AdminSiteMapService.cs @@ -6,7 +6,7 @@ using Grand.Infrastructure.Extensions; using MediatR; -namespace Grand.Business.System.Services.Admin; +namespace Grand.Web.Common.Menu; public class AdminSiteMapService : IAdminSiteMapService { diff --git a/src/Web/Grand.Web.Common/Startup/StartupApplication.cs b/src/Web/Grand.Web.Common/Startup/StartupApplication.cs index 2b2a025da..acf098ae9 100644 --- a/src/Web/Grand.Web.Common/Startup/StartupApplication.cs +++ b/src/Web/Grand.Web.Common/Startup/StartupApplication.cs @@ -1,4 +1,5 @@ using Grand.Business.Core.Interfaces.Common.Pdf; +using Grand.Business.Core.Interfaces.System.Admin; using Grand.Data; using Grand.Infrastructure; using Grand.Infrastructure.Caching; @@ -8,6 +9,7 @@ using Grand.Infrastructure.Configuration; using Grand.Infrastructure.Validators; using Grand.Web.Common.Localization; +using Grand.Web.Common.Menu; using Grand.Web.Common.Middleware; using Grand.Web.Common.Page; using Grand.Web.Common.Routing; @@ -97,6 +99,9 @@ private void RegisterContextService(IServiceCollection serviceCollection) //Default theme view serviceCollection.AddScoped(); + + //Admin site map service + serviceCollection.AddScoped(); }