Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Admin - remove unused using (and variables)
KrzysztofPajak9ce988546e1b
diff --git a/src/Web/Grand.Web.Admin/Controllers/HomeController.cs b/src/Web/Grand.Web.Admin/Controllers/HomeController.csindex fca1665b2..7eae8adf8 100644--- a/src/Web/Grand.Web.Admin/Controllers/HomeController.cs+++ b/src/Web/Grand.Web.Admin/Controllers/HomeController.cs@@ -1,15 +1,16 @@-using Grand.Business.Checkout.Queries.Models.Orders;+using Grand.Business.Authentication.Interfaces;+using Grand.Business.Checkout.Queries.Models.Orders;using Grand.Business.Common.Extensions;using Grand.Business.Common.Interfaces.Directory;using Grand.Business.Common.Interfaces.Localization;using Grand.Business.Common.Interfaces.Logging;-using Grand.Business.Customers.Interfaces;+using Grand.Business.Customers.Queries.Models;using Grand.Business.System.Interfaces.Reports;-using Grand.Infrastructure;using Grand.Domain.Customers;using Grand.Domain.Directory;using Grand.Domain.Orders;using Grand.Domain.Seo;+using Grand.Infrastructure;using Grand.Web.Admin.Extensions;using Grand.Web.Admin.Models.Home;using MediatR;@@ -18,9 +19,6 @@ using System;using System.Collections.Generic;using System.Linq;using System.Threading.Tasks;-using Grand.Business.Customers.Queries.Models;-using Microsoft.AspNetCore.Authentication;-using Grand.Business.Authentication.Interfaces;namespace Grand.Web.Admin.Controllers{@@ -87,7 +85,8 @@ namespace Grand.Web.Admin.Controllersmodel.MerchandiseReturns = await _mediator.Send(new GetMerchandiseReturnCountQuery() { RequestStatusId = 0, StoreId = storeId });model.TodayRegisteredCustomers =- (await _mediator.Send(new GetCustomerQuery() { StoreId = storeId,+ (await _mediator.Send(new GetCustomerQuery() {+ StoreId = storeId,CustomerGroupIds = new string[] { (await _groupService.GetCustomerGroupBySystemName(SystemCustomerGroupNames.Registered)).Id },CreatedFromUtc = DateTime.UtcNow.Date})).Count();@@ -101,8 +100,7 @@ namespace Grand.Web.Admin.Controllerspublic async Task<IActionResult> Index(){- var model = new DashboardModel- {+ var model = new DashboardModel {IsLoggedInAsVendor = _workContext.CurrentVendor != null && !await _groupService.IsStaff(_workContext.CurrentCustomer)};if (string.IsNullOrEmpty(_googleAnalyticsSettings.gaprivateKey) ||@@ -115,8 +113,7 @@ namespace Grand.Web.Admin.Controllerspublic async Task<IActionResult> Statistics(){- var model = new DashboardModel- {+ var model = new DashboardModel {IsLoggedInAsVendor = _workContext.CurrentVendor != null && !await _groupService.IsStaff(_workContext.CurrentCustomer)};return View(model);diff --git a/src/Web/Grand.Web.Admin/Controllers/LanguageController.cs b/src/Web/Grand.Web.Admin/Controllers/LanguageController.csindex d6981ce45..a938c8bc8 100644--- a/src/Web/Grand.Web.Admin/Controllers/LanguageController.cs+++ b/src/Web/Grand.Web.Admin/Controllers/LanguageController.cs@@ -22,10 +22,11 @@ namespace Grand.Web.Admin.Controllerspublic partial class LanguageController : BaseAdminController{#region Fields+private readonly ILanguageViewModelService _languageViewModelService;private readonly ILanguageService _languageService;private readonly ITranslationService _translationService;- private readonly IStoreService _storeService;+#endregion#region Constructors@@ -33,13 +34,11 @@ namespace Grand.Web.Admin.Controllerspublic LanguageController(ILanguageViewModelService languageViewModelService,ILanguageService languageService,- ITranslationService translationService,- IStoreService storeService)+ ITranslationService translationService){_languageViewModelService = languageViewModelService;_translationService = translationService;_languageService = languageService;- _storeService = storeService;}#endregiondiff --git a/src/Web/Grand.Web.Admin/Controllers/PageController.cs b/src/Web/Grand.Web.Admin/Controllers/PageController.csindex fb39fade7..acc5f8aa0 100644--- a/src/Web/Grand.Web.Admin/Controllers/PageController.cs+++ b/src/Web/Grand.Web.Admin/Controllers/PageController.cs@@ -27,8 +27,6 @@ namespace Grand.Web.Admin.Controllersprivate readonly IPageService _pageService;private readonly ILanguageService _languageService;private readonly ITranslationService _translationService;- private readonly IStoreService _storeService;- private readonly IGroupService _groupService;private readonly IWorkContext _workContext;private readonly IDateTimeService _dateTimeService;@@ -41,8 +39,6 @@ namespace Grand.Web.Admin.ControllersIPageService pageService,ILanguageService languageService,ITranslationService translationService,- IStoreService storeService,- IGroupService groupService,IWorkContext workContext,IDateTimeService dateTimeService){@@ -50,8 +46,6 @@ namespace Grand.Web.Admin.Controllers_pageService = pageService;_languageService = languageService;_translationService = translationService;- _storeService = storeService;- _groupService = groupService;_workContext = workContext;_dateTimeService = dateTimeService;}diff --git a/src/Web/Grand.Web.Admin/Controllers/ProductReviewController.cs b/src/Web/Grand.Web.Admin/Controllers/ProductReviewController.csindex 4bc8c6ad8..29c888b10 100644--- a/src/Web/Grand.Web.Admin/Controllers/ProductReviewController.cs+++ b/src/Web/Grand.Web.Admin/Controllers/ProductReviewController.cs@@ -1,18 +1,17 @@using Grand.Business.Catalog.Interfaces.Products;+using Grand.Business.Common.Interfaces.Directory;using Grand.Business.Common.Interfaces.Localization;using Grand.Business.Common.Services.Security;using Grand.Infrastructure;-using Grand.Domain.Customers;+using Grand.Web.Admin.Interfaces;+using Grand.Web.Admin.Models.Catalog;using Grand.Web.Common.DataSource;using Grand.Web.Common.Filters;using Grand.Web.Common.Security.Authorization;-using Grand.Web.Admin.Interfaces;-using Grand.Web.Admin.Models.Catalog;using Microsoft.AspNetCore.Mvc;using System.Collections.Generic;using System.Linq;using System.Threading.Tasks;-using Grand.Business.Common.Interfaces.Directory;namespace Grand.Web.Admin.Controllers{@@ -67,8 +66,7 @@ namespace Grand.Web.Admin.Controllersmodel.SearchStoreId = _workContext.CurrentCustomer.StaffStoreId;var (productReviewModels, totalCount) = await _productReviewViewModelService.PrepareProductReviewsModel(model, command.Page, command.PageSize);- var gridModel = new DataSourceResult- {+ var gridModel = new DataSourceResult {Data = productReviewModels.ToList(),Total = totalCount,};diff --git a/src/Web/Grand.Web.Admin/Controllers/VendorReviewController.cs b/src/Web/Grand.Web.Admin/Controllers/VendorReviewController.csindex ff866acde..327e280af 100644--- a/src/Web/Grand.Web.Admin/Controllers/VendorReviewController.cs+++ b/src/Web/Grand.Web.Admin/Controllers/VendorReviewController.cs@@ -1,20 +1,19 @@-using Grand.Infrastructure;-using Grand.Domain.Customers;-using Grand.Web.Common.DataSource;-using Grand.Web.Common.Filters;-using Grand.Web.Common.Security.Authorization;+using Grand.Business.Common.Interfaces.Directory;using Grand.Business.Common.Interfaces.Localization;using Grand.Business.Common.Services.Security;using Grand.Business.Customers.Interfaces;+using Grand.Infrastructure;+using Grand.Web.Admin.Interfaces;using Grand.Web.Admin.Models.Customers;using Grand.Web.Admin.Models.Vendors;-using Grand.Web.Admin.Interfaces;+using Grand.Web.Common.DataSource;+using Grand.Web.Common.Filters;+using Grand.Web.Common.Security.Authorization;using Microsoft.AspNetCore.Mvc;using System;using System.Collections.Generic;using System.Linq;using System.Threading.Tasks;-using Grand.Business.Common.Interfaces.Directory;namespace Grand.Web.Admin.Controllers{@@ -22,6 +21,7 @@ namespace Grand.Web.Admin.Controllerspublic partial class VendorReviewController : BaseAdminController{#region Fields+private readonly IVendorViewModelService _vendorViewModelService;private readonly IVendorService _vendorService;private readonly ITranslationService _translationService;@@ -77,8 +77,7 @@ namespace Grand.Web.Admin.Controllersmodel.SearchVendorId = vendorId;var (vendorReviewModels, totalCount) = await _vendorViewModelService.PrepareVendorReviewModel(model, command.Page, command.PageSize);- var gridModel = new DataSourceResult- {+ var gridModel = new DataSourceResult {Data = vendorReviewModels.ToList(),Total = totalCount,};diff --git a/src/Web/Grand.Web.Admin/Controllers/WidgetController.cs b/src/Web/Grand.Web.Admin/Controllers/WidgetController.csindex 072a0790e..1f011289d 100644--- a/src/Web/Grand.Web.Admin/Controllers/WidgetController.cs+++ b/src/Web/Grand.Web.Admin/Controllers/WidgetController.cs@@ -20,11 +20,13 @@ namespace Grand.Web.Admin.Controllerspublic partial class WidgetController : BaseAdminController{#region Fields+private readonly IWidgetService _widgetService;private readonly ISettingService _settingService;private readonly ICacheBase _cacheBase;private readonly IServiceProvider _serviceProvider;private readonly WidgetSettings _widgetSettings;+#endregion#region Constructors