Skip to content

Commit

Permalink
PT-13500: Fix DateTimeKind of Unspecified (#55)
Browse files Browse the repository at this point in the history
fix: DateTime values coming back from the SqlServer database always have a DateTimeKind of Unspecified
  • Loading branch information
OlegoO authored Sep 20, 2023
1 parent 73d5125 commit c35a113
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
<PackageReference Include="VirtoCommerce.CustomerModule.Core" Version="3.400.0" />
<PackageReference Include="VirtoCommerce.NotificationsModule.Core" Version="3.400.0" />
<PackageReference Include="VirtoCommerce.OrdersModule.Core" Version="3.400.0" />
<PackageReference Include="VirtoCommerce.Platform.Core" Version="3.400.0" />
<PackageReference Include="VirtoCommerce.Platform.Core" Version="3.413.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -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<CustomerReviewsDbContext> options)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,7 @@ private async Task<IRatingCalculator> GetCalculatorAsync(string storeId)

if (store != null)
{
calculatorName = store.Settings.GetSettingValue(
ReviewSettings.CalculationMethod.Name,
ReviewSettings.CalculationMethod.DefaultValue.ToString());
calculatorName = store.Settings.GetValue<string>(ReviewSettings.CalculationMethod);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="VirtoCommerce.CatalogModule.Core" Version="3.401.0" />
<PackageReference Include="VirtoCommerce.Platform.Data" Version="3.400.0" />
<PackageReference Include="VirtoCommerce.Platform.Hangfire" Version="3.400.0" />
<PackageReference Include="VirtoCommerce.Platform.Data" Version="3.413.0" />
<PackageReference Include="VirtoCommerce.Platform.Hangfire" Version="3.413.0" />
<PackageReference Include="VirtoCommerce.StoreModule.Core" Version="3.400.0" />
</ItemGroup>
<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/VirtoCommerce.CustomerReviews.Web/module.manifest
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<id>VirtoCommerce.CustomerReviews</id>
<version>3.401.0</version>
<version-tag />
<platformVersion>3.400.0</platformVersion>
<platformVersion>3.413.0</platformVersion>
<dependencies>
<dependency id="VirtoCommerce.Catalog" version="3.401.0" />
<dependency id="VirtoCommerce.Customer" version="3.400.0" />
Expand Down Expand Up @@ -31,4 +31,4 @@
<assemblyFile>VirtoCommerce.CustomerReviews.Web.dll</assemblyFile>
<moduleType>VirtoCommerce.CustomerReviews.Web.Module, VirtoCommerce.CustomerReviews.Web</moduleType>
<useFullTypeNameInSwagger>false</useFullTypeNameInSwagger>
</module>
</module>

0 comments on commit c35a113

Please sign in to comment.