Skip to content

Commit

Permalink
Fixed breaking changes with RC2.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Rasmussen committed Oct 10, 2023
1 parent b268a9c commit 50a2687
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0-rc.1.23419.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0-rc.2.23480.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NodaTime" Version="3.1.0" />
<PackageReference Include="xunit" Version="2.5.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
<PackageProjectUrl>https://github.com/StevenRasmussen/EFCore.SqlServer.NodaTime</PackageProjectUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Entity Framework Core;entity-framework-core;EF;Data;O/RM;EntityFrameworkCore;EFCore;Noda;NodaTime;Noda Time</PackageTags>
<Version>8.0.0-rc.1.23419.6</Version>
<Version>8.0.0-rc.2.23480.1</Version>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2023.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0-rc.1.23419.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0-rc.2.23480.1" />
<PackageReference Include="NodaTime" Version="3.1.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public SqlServerNodaTimeTypeMappingSourcePlugin()
this.AddTypeMappingToDictionaries(this._durationTypeMapping);
}

public virtual RelationalTypeMapping FindMapping(in RelationalTypeMappingInfo mappingInfo)
public RelationalTypeMapping FindMapping(in RelationalTypeMappingInfo mappingInfo)
{
var clrType = mappingInfo.ClrType;
var storeTypeName = mappingInfo.StoreTypeName;
Expand All @@ -73,11 +73,11 @@ public virtual RelationalTypeMapping FindMapping(in RelationalTypeMappingInfo ma
if (StoreTypeMappings.TryGetValue(storeTypeNameBase!, out mappings))
{
if (clrType == null)
return mappings[0].Clone(in mappingInfo);
return mappings[0].Clone(mappingInfo);

foreach (var m in mappings)
if (m.ClrType == clrType)
return m.Clone(in mappingInfo);
return m.Clone(mappingInfo);

return null;
}
Expand All @@ -88,7 +88,7 @@ public virtual RelationalTypeMapping FindMapping(in RelationalTypeMappingInfo ma

// TODO: Cache size/precision/scale mappings?
return mappingInfo.Precision.HasValue && _hasPrecisionTypes.Contains(mapping.ClrType)
? mapping.Clone($"{mapping.StoreType}({mappingInfo.Precision.Value})", null)
? mapping.Clone(mappingInfo)
: mapping;
}

Expand Down

0 comments on commit 50a2687

Please sign in to comment.