diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductDetailHistories/ProductDetailHistoryRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductDetailHistories/ProductDetailHistoryRepository.cs index 3f19a5fd..30f053ce 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductDetailHistories/ProductDetailHistoryRepository.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductDetailHistories/ProductDetailHistoryRepository.cs @@ -18,7 +18,7 @@ namespace EasyAbp.EShop.Products.ProductDetailHistories public async Task GetAsync(Guid productDetailId, DateTime modificationTime, CancellationToken cancellationToken = default) { - var entity = await GetQueryable() + var entity = await (await GetQueryableAsync()) .Where(x => x.ModificationTime == modificationTime && x.ProductDetailId == productDetailId) .FirstOrDefaultAsync(cancellationToken); diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductHistories/ProductHistoryRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductHistories/ProductHistoryRepository.cs index a4936474..d33ba65b 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductHistories/ProductHistoryRepository.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductHistories/ProductHistoryRepository.cs @@ -18,7 +18,7 @@ namespace EasyAbp.EShop.Products.ProductHistories public async Task GetAsync(Guid productId, DateTime modificationTime, CancellationToken cancellationToken = default) { - var entity = await GetQueryable() + var entity = await (await GetQueryableAsync()) .Where(x => x.ModificationTime == modificationTime && x.ProductId == productId) .FirstOrDefaultAsync(cancellationToken); diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductInventories/ProductInventoryRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductInventories/ProductInventoryRepository.cs index a9c380cc..a67e8ec1 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductInventories/ProductInventoryRepository.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductInventories/ProductInventoryRepository.cs @@ -18,7 +18,7 @@ namespace EasyAbp.EShop.Products.ProductInventories public async Task GetInventoryDataAsync(Guid productSkuId, CancellationToken cancellationToken = default) { - return await GetQueryable() + return await (await GetQueryableAsync()) .Where(x => x.ProductSkuId == productSkuId) .Select(x => new InventoryDataModel { diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Products/ProductViewRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Products/ProductViewRepository.cs index 8f99664a..ccf40f82 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Products/ProductViewRepository.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Products/ProductViewRepository.cs @@ -20,7 +20,7 @@ namespace EasyAbp.EShop.Products.Products public virtual async Task> GetQueryableAsync(Guid categoryId) { - return await JoinProductCategoriesAsync(DbSet, categoryId); + return await JoinProductCategoriesAsync(await GetDbSetAsync(), categoryId); } public virtual async Task> WithDetailsAsync(Guid categoryId) diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/GrantedStores/GrantedStoreController.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/GrantedStores/GrantedStoreController.cs index 6e1025ba..2bbe3f1b 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/GrantedStores/GrantedStoreController.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/GrantedStores/GrantedStoreController.cs @@ -4,7 +4,6 @@ using Volo.Abp.Application.Dtos; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp; -using Volo.Abp.Application.Dtos; namespace EasyAbp.EShop.Plugins.Booking.GrantedStores { diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/EasyAbp.EShop.Plugins.Booking.Installer.csproj b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/EasyAbp.EShop.Plugins.Booking.Installer.csproj index 4ac108ed..5bcc4178 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/EasyAbp.EShop.Plugins.Booking.Installer.csproj +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/EasyAbp.EShop.Plugins.Booking.Installer.csproj @@ -3,7 +3,7 @@ - net5.0 + net6.0 true diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/BookingWebAutoMapperProfile.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/BookingWebAutoMapperProfile.cs index fac87b9f..c7e7786d 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/BookingWebAutoMapperProfile.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/BookingWebAutoMapperProfile.cs @@ -1,9 +1,7 @@ using EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos; using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAsset.ViewModels; -using EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos; using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAssetPeriod.ViewModels; using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos; -using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos; using AutoMapper; using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory.ViewModels; using EasyAbp.EShop.Plugins.Booking.GrantedStores.Dtos; diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponAppService.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponAppService.cs index 58f83f38..893475e9 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponAppService.cs +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponAppService.cs @@ -38,7 +38,7 @@ namespace EasyAbp.EShop.Plugins.Coupons.Coupons protected override async Task> CreateFilteredQueryAsync(GetCouponListInput input) { return (input.AvailableOnly - ? _repository.GetAvailableCouponQueryable(Clock) + ? await _repository.GetAvailableCouponQueryableAsync(Clock) : await _repository.GetQueryableAsync()) .WhereIf(input.UserId.HasValue, x => x.UserId == input.UserId.Value) .WhereIf(!input.AvailableOnly && !input.IncludesUsed, x => !x.UsedTime.HasValue) diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain/EasyAbp/EShop/Plugins/Coupons/Coupons/ICouponRepository.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain/EasyAbp/EShop/Plugins/Coupons/Coupons/ICouponRepository.cs index 825bef1b..f68975ee 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain/EasyAbp/EShop/Plugins/Coupons/Coupons/ICouponRepository.cs +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain/EasyAbp/EShop/Plugins/Coupons/Coupons/ICouponRepository.cs @@ -1,5 +1,6 @@ using System; using System.Linq; +using System.Threading.Tasks; using Volo.Abp.Domain.Repositories; using Volo.Abp.Timing; @@ -7,6 +8,6 @@ namespace EasyAbp.EShop.Plugins.Coupons.Coupons { public interface ICouponRepository : IRepository { - IQueryable GetAvailableCouponQueryable(IClock clock); + Task> GetAvailableCouponQueryableAsync(IClock clock); } } \ No newline at end of file diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponRepository.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponRepository.cs index 49f66146..4e778b39 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponRepository.cs +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponRepository.cs @@ -17,14 +17,14 @@ namespace EasyAbp.EShop.Plugins.Coupons.Coupons { } - public virtual IQueryable GetAvailableCouponQueryable(IClock clock) + public virtual async Task> GetAvailableCouponQueryableAsync(IClock clock) { var now = clock.Now; - return DbSet + return (await GetDbSetAsync()) .Where(x => x.ExpirationTime > now) .Join( - DbContext.CouponTemplates.Where(x => !x.UsableBeginTime.HasValue || x.UsableBeginTime.Value <= now), + (await GetDbContextAsync()).CouponTemplates.Where(x => !x.UsableBeginTime.HasValue || x.UsableBeginTime.Value <= now), coupon => coupon.CouponTemplateId, couponTemplate => couponTemplate.Id, (coupon, couponTemplate) => coupon diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp/EShop/Plugins/Coupons/CouponTemplates/CouponTemplateController.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp/EShop/Plugins/Coupons/CouponTemplates/CouponTemplateController.cs index a0d5fe96..b6fe89de 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp/EShop/Plugins/Coupons/CouponTemplates/CouponTemplateController.cs +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp/EShop/Plugins/Coupons/CouponTemplates/CouponTemplateController.cs @@ -4,7 +4,6 @@ using Volo.Abp.Application.Dtos; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp; -using Volo.Abp.Application.Dtos; namespace EasyAbp.EShop.Plugins.Coupons.CouponTemplates { diff --git a/samples/EShopSample/aspnet-core/test/EShopSample.Web.Tests/EShopSampleWebTestModule.cs b/samples/EShopSample/aspnet-core/test/EShopSample.Web.Tests/EShopSampleWebTestModule.cs index 79ccd925..59d19936 100644 --- a/samples/EShopSample/aspnet-core/test/EShopSample.Web.Tests/EShopSampleWebTestModule.cs +++ b/samples/EShopSample/aspnet-core/test/EShopSample.Web.Tests/EShopSampleWebTestModule.cs @@ -87,7 +87,7 @@ namespace EShopSample } }); - app.UseVirtualFiles(); + app.UseStaticFiles(); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization();