From c35a113b3a16d2c05481f223d156ef260546c4cb Mon Sep 17 00:00:00 2001 From: Oleg Zhuk Date: Wed, 20 Sep 2023 09:55:12 +0200 Subject: [PATCH] PT-13500: Fix DateTimeKind of Unspecified (#55) fix: DateTime values coming back from the SqlServer database always have a DateTimeKind of Unspecified --- .../VirtoCommerce.CustomerReviews.Core.csproj | 2 +- .../Repositories/CustomerReviewsDbContext.cs | 4 ++-- .../Services/RatingService.cs | 4 +--- .../VirtoCommerce.CustomerReviews.Data.csproj | 4 ++-- src/VirtoCommerce.CustomerReviews.Web/module.manifest | 6 +++--- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/VirtoCommerce.CustomerReviews.Core/VirtoCommerce.CustomerReviews.Core.csproj b/src/VirtoCommerce.CustomerReviews.Core/VirtoCommerce.CustomerReviews.Core.csproj index d3904be..13d3b6b 100644 --- a/src/VirtoCommerce.CustomerReviews.Core/VirtoCommerce.CustomerReviews.Core.csproj +++ b/src/VirtoCommerce.CustomerReviews.Core/VirtoCommerce.CustomerReviews.Core.csproj @@ -17,6 +17,6 @@ - + \ No newline at end of file diff --git a/src/VirtoCommerce.CustomerReviews.Data/Repositories/CustomerReviewsDbContext.cs b/src/VirtoCommerce.CustomerReviews.Data/Repositories/CustomerReviewsDbContext.cs index 6e8bf6b..b5256c8 100644 --- a/src/VirtoCommerce.CustomerReviews.Data/Repositories/CustomerReviewsDbContext.cs +++ b/src/VirtoCommerce.CustomerReviews.Data/Repositories/CustomerReviewsDbContext.cs @@ -1,11 +1,11 @@ using System.Reflection; -using EntityFrameworkCore.Triggers; using Microsoft.EntityFrameworkCore; using VirtoCommerce.CustomerReviews.Data.Models; +using VirtoCommerce.Platform.Data.Infrastructure; namespace VirtoCommerce.CustomerReviews.Data.Repositories { - public class CustomerReviewsDbContext : DbContextWithTriggers + public class CustomerReviewsDbContext : DbContextBase { #pragma warning disable S109 public CustomerReviewsDbContext(DbContextOptions options) diff --git a/src/VirtoCommerce.CustomerReviews.Data/Services/RatingService.cs b/src/VirtoCommerce.CustomerReviews.Data/Services/RatingService.cs index 3018ed6..79e8976 100644 --- a/src/VirtoCommerce.CustomerReviews.Data/Services/RatingService.cs +++ b/src/VirtoCommerce.CustomerReviews.Data/Services/RatingService.cs @@ -241,9 +241,7 @@ private async Task GetCalculatorAsync(string storeId) if (store != null) { - calculatorName = store.Settings.GetSettingValue( - ReviewSettings.CalculationMethod.Name, - ReviewSettings.CalculationMethod.DefaultValue.ToString()); + calculatorName = store.Settings.GetValue(ReviewSettings.CalculationMethod); } } diff --git a/src/VirtoCommerce.CustomerReviews.Data/VirtoCommerce.CustomerReviews.Data.csproj b/src/VirtoCommerce.CustomerReviews.Data/VirtoCommerce.CustomerReviews.Data.csproj index a8ea5be..010309b 100644 --- a/src/VirtoCommerce.CustomerReviews.Data/VirtoCommerce.CustomerReviews.Data.csproj +++ b/src/VirtoCommerce.CustomerReviews.Data/VirtoCommerce.CustomerReviews.Data.csproj @@ -15,8 +15,8 @@ - - + + diff --git a/src/VirtoCommerce.CustomerReviews.Web/module.manifest b/src/VirtoCommerce.CustomerReviews.Web/module.manifest index dc5cc17..9f75478 100644 --- a/src/VirtoCommerce.CustomerReviews.Web/module.manifest +++ b/src/VirtoCommerce.CustomerReviews.Web/module.manifest @@ -1,9 +1,9 @@ - + VirtoCommerce.CustomerReviews 3.401.0 - 3.400.0 + 3.413.0 @@ -31,4 +31,4 @@ VirtoCommerce.CustomerReviews.Web.dll VirtoCommerce.CustomerReviews.Web.Module, VirtoCommerce.CustomerReviews.Web false - \ No newline at end of file +