Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrations fails since EF Core 7.0.4 #30503

Closed
jochenjonc opened this issue Mar 16, 2023 · 10 comments
Closed

Migrations fails since EF Core 7.0.4 #30503

jochenjonc opened this issue Mar 16, 2023 · 10 comments

Comments

@jochenjonc
Copy link

jochenjonc commented Mar 16, 2023

Hi,

Yesterday I did a minor dotnet upgrade from 7.0.3 to 7.0.4 and suddenly I couldn't run/create any migrations. Because of the following error:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.InvalidOperationException: The comparer for type 'double?' cannot be used for 'Customer.Latitude' because its type is 'decimal'.
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelValidator.ValidateTypeMappings(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelValidator.Validate(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.Infrastructure.RelationalModelValidator.Validate(IModel model, IDiagnosticsLogger`1 logger)
   at Oracle.EntityFrameworkCore.Infrastructure.Internal.OracleModelValidator.Validate(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelRuntimeInitializer.Initialize(IModel model, Boolean designTime, IDiagnosticsLogger`1 validationLogger)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.GetModel(DbContext context, ModelCreationDependencies modelCreationDependencies, Boolean designTime)
   at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel(Boolean designTime)
   at Microsoft.EntityFrameworkCore.Internal.DbContextServices.get_Model()
   at Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder.<>c.<TryAddCoreServices>b__8_4(IServiceProvider p)
   ...

The EntityTypeConfiguration is the following:

builder.Property<double?>(e => e.Latitude)
       .HasColumnName("POS_Y")
       .HasColumnType("NUMBER(8,5)")
       .HasPrecision(8, 5);

The property is of type double? and the column is a NUMBER.

I think the problem is caused by the following change in EF Core f4e549e which is a fix for #29985.

Somehow EF Core returns another ClrType or ProviderClrType that makes the OracleModelValidator.Validate fail.

I was able to fix this by adding a HasConversion<decimal?>.

builder.Property<double?>(e => e.Latitude)
       .HasConversion<decimal?>()
       .HasColumnName("POS_Y") 
       .HasColumnType("NUMBER(8,5)") 
       .HasPrecision(8, 5);

I only need to add this HasConversion<decimal?> on fields where NUMBER is used in the database and int, long, double, … is used in code. I'm not a 100% sure, but I think it is also only Nullable types that are impacted.

Can you verify if the workaround is valid and won't cause any additional problems?
I created this post because maybe other database providers can have similar issues.

FYI, I cross-posted this on https://forums.oracle.com/ords/apexds/post/migrations-fails-since-ef-core-7-0-4-6440.

Regards,

Jochen

Provider and version information

EF Core version: 7.0.4
Database provider: Oracle.EntityFrameworkCore
Target framework: .NET 7.0
Operating system: Windows 11
IDE: Visual Studio 2022 17.5

@ajcvickers
Copy link
Contributor

@jochenjonc Please post your .csprog file.

@jochenjonc
Copy link
Author

@ajcvickers below you can find the contents of the csproj and package.lock.json after the update to 7.0.4. And I also added the package.lock.json from when I was using 7.0.3

*.csproj

<Project Sdk="Microsoft.NET.Sdk">

	<PropertyGroup>
		<TargetFramework>net7.0</TargetFramework>
		<LangVersion>latest</LangVersion>
		<Nullable>enable</Nullable>
		<ImplicitUsings>enable</ImplicitUsings>
		<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
		<AnalysisLevel>6.0-recommended</AnalysisLevel>
	</PropertyGroup>

	<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
		<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
		<WarningsNotAsErrors>CS0809</WarningsNotAsErrors>
	</PropertyGroup>

	<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
		<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
		<WarningsNotAsErrors>CS0809</WarningsNotAsErrors>
	</PropertyGroup>

	<ItemGroup>
		<PackageReference Include="My.Library.Oracle.EntityFrameworkCore" Version="7.0.1" />
		<PackageReference Include="My.Library.EntityFrameworkCore" Version="7.0.1" />
		<PackageReference Include="EFCoreSecondLevelCacheInterceptor" Version="3.8.6" />
		<PackageReference Include="LinqKit.Microsoft.EntityFrameworkCore" Version="7.1.4" />
		<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.4" />
		<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.4" />
		<PackageReference Include="Oracle.EntityFrameworkCore" Version="7.21.9" />
		<PackageReference Include="Scrutor" Version="4.2.1" />
		<PackageReference Include="Sieve" Version="2.5.5" />
	</ItemGroup>

	<ItemGroup>
		<ProjectReference Include="..\My.Domain\My.Domain.csproj" />
		<ProjectReference Include="..\My.Models\My.Models.csproj" />
	</ItemGroup>

	<ItemGroup>
		<InternalsVisibleTo Include="My.Dal.UnitTests" />
	</ItemGroup>

</Project>

package.lock.json (7.0.4)

{
  "version": 1,
  "dependencies": {
    "net7.0": {
      "My.Library.EntityFrameworkCore": {
        "type": "Direct",
        "requested": "[7.0.1, )",
        "resolved": "7.0.1",
        "contentHash": "oT1wxlTdVwbeQ5bptEWX5+TBvDXC0uMDdYdXT4F+E+nI/aRezpHixEUB3xLmEcT/pjcOssk7rKEkWAu7On3NEQ==",
        "dependencies": {
          "My.Library": "7.0.1",
          "My.Domain": "7.0.1",
          "Microsoft.EntityFrameworkCore": "7.0.0",
          "Microsoft.EntityFrameworkCore.Relational": "7.0.0"
        }
      },
      "My.Library.Oracle.EntityFrameworkCore": {
        "type": "Direct",
        "requested": "[7.0.1, )",
        "resolved": "7.0.1",
        "contentHash": "O7ZlRwNIiHW8Z+iJmkI4E/vuSec96TEGFc8p0F2Bko+S3bWVayZcy3CcTuf9RDY6377bzreSHnMZmkyrMgRRoA==",
        "dependencies": {
          "Oracle.EntityFrameworkCore": "[7.21.8, 8.0.0)"
        }
      },
      "EFCoreSecondLevelCacheInterceptor": {
        "type": "Direct",
        "requested": "[3.8.6, )",
        "resolved": "3.8.6",
        "contentHash": "tf0TjL3iMXAiHq/lkNLWiq50riQ8TifpGYocKAUS1Z0D+psgKINXwCbTGoy5cMgzRbEbCqzI9GXcrMPpVTcbBA==",
        "dependencies": {
          "CacheManager.Core": "1.2.0",
          "EasyCaching.Core": "1.8.0",
          "Microsoft.EntityFrameworkCore": "7.0.0",
          "Microsoft.EntityFrameworkCore.Relational": "7.0.0",
          "NeoSmart.AsyncLock": "3.2.1"
        }
      },
      "LinqKit.Microsoft.EntityFrameworkCore": {
        "type": "Direct",
        "requested": "[7.1.4, )",
        "resolved": "7.1.4",
        "contentHash": "Bsq1/HXOC29GjviRq971qYz3/+9GWKEKO4QdoaEjMt5HHHx8b4yHL8RGzohdiqjTjOOVM5oZF9eaOpLcFu8uUA==",
        "dependencies": {
          "LinqKit.Core": "1.2.4",
          "Microsoft.EntityFrameworkCore": "7.0.0"
        }
      },
      "Microsoft.EntityFrameworkCore": {
        "type": "Direct",
        "requested": "[7.0.4, )",
        "resolved": "7.0.4",
        "contentHash": "eNcsY3rft5ERJJcen80Jyg57EScjWZmvhwmFLYXmEOTdVqHG+wQZiMOXnO1b5RH3u2qTQq+Tpci7KGfLAG5Gtg==",
        "dependencies": {
          "Microsoft.EntityFrameworkCore.Abstractions": "7.0.4",
          "Microsoft.EntityFrameworkCore.Analyzers": "7.0.4",
          "Microsoft.Extensions.Caching.Memory": "7.0.0",
          "Microsoft.Extensions.DependencyInjection": "7.0.0",
          "Microsoft.Extensions.Logging": "7.0.0"
        }
      },
      "Microsoft.EntityFrameworkCore.Relational": {
        "type": "Direct",
        "requested": "[7.0.4, )",
        "resolved": "7.0.4",
        "contentHash": "L41+VonK6L0IurFHopoe5yY+m3MD26OMocKLPPR/XKxnazzZUcGPz0IGJpVnwpZyKVPfEIAnD5vmm60meYr1NA==",
        "dependencies": {
          "Microsoft.EntityFrameworkCore": "7.0.4",
          "Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
        }
      },
      "Oracle.EntityFrameworkCore": {
        "type": "Direct",
        "requested": "[7.21.9, )",
        "resolved": "7.21.9",
        "contentHash": "TVOkSpclkQ+JR62LotgUwprmRHxQXtkwBpiyLcrkomJ29knF/4i4/eLItkAMfiT8/KWAbkIelNSt1IqCc0+cxg==",
        "dependencies": {
          "Microsoft.EntityFrameworkCore.Relational": "[7.0.0, 8.0.0)",
          "Oracle.ManagedDataAccess.Core": "[3.21.90, 3.22.0)"
        }
      },
      "Scrutor": {
        "type": "Direct",
        "requested": "[4.2.1, )",
        "resolved": "4.2.1",
        "contentHash": "nFNpqlwIcseBIUMlTg25t7qYYLk7S0jrEXpZaPo6rhw8860Gnky8pbCYeDxSfKmIoJdMYtVxkbMENiIZbblm/Q==",
        "dependencies": {
          "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
          "Microsoft.Extensions.DependencyModel": "6.0.0"
        }
      },
      "Sieve": {
        "type": "Direct",
        "requested": "[2.5.5, )",
        "resolved": "2.5.5",
        "contentHash": "JNT/m73vu7lzUfi+DNGVRptWYDJTRhS7BgVwqcvlEq5sAhrMmiFZJxM3LPagjsJbcuscMrmMfLgLvhyDNGv/Bg==",
        "dependencies": {
          "Microsoft.CSharp": "4.4.1",
          "Microsoft.Extensions.Options": "2.0.0",
          "System.ComponentModel.Annotations": "4.4.1"
        }
      },
      "My.Library": {
        "type": "Transitive",
        "resolved": "7.0.1",
        "contentHash": "vgWSTenGu6+NQUHWbfNKHrc2GYsRx2m4jy+RYDrU9FGZjhaWcuPOtdXFBLAzVnk//KK/pcK9GY16Wp8TTj1boA==",
        "dependencies": {
          "Microsoft.Extensions.Logging.Abstractions": "7.0.0"
        }
      },
      "My.Domain": {
        "type": "Transitive",
        "resolved": "7.0.1",
        "contentHash": "XBeoz77YHkmzv0QwH2mkGqQctns0Qnod+iFuNwefw4Gq3CYguiM2EnwISAzb98XOPa3CPaL2/G4TcNJNoUrNQw=="
      },
      "CacheManager.Core": {
        "type": "Transitive",
        "resolved": "1.2.0",
        "contentHash": "tmgwGDJlPNdSTb94Bx/0D3fDlkP+HIa80d1nCrXs+NjTgZR8JaQcslH+PHP2ebxPkM4CnijQVEMD+Dk8CvR41w=="
      },
      "EasyCaching.Core": {
        "type": "Transitive",
        "resolved": "1.8.0",
        "contentHash": "zf+1IpZ2K75dgrgYw+qhOKLlj+m2tiYpMcOtQIPg+t2jPPL12A3mQK8hvMk9wZjujbEdIEQpCctOAYPdF773WQ==",
        "dependencies": {
          "Microsoft.Extensions.DependencyInjection": "6.0.0",
          "Microsoft.Extensions.Logging": "6.0.0",
          "Microsoft.Extensions.Options.ConfigurationExtensions": "6.0.0",
          "System.Diagnostics.DiagnosticSource": "6.0.0"
        }
      },
      "LinqKit.Core": {
        "type": "Transitive",
        "resolved": "1.2.4",
        "contentHash": "cR88ymKSFZu1XZnmUzGl8eyeLRqnpiTMZBf+DBSr4kWRmfr40mwNdyLooCe3Or/WbkkmCo5erypLdmZTsNXi+w=="
      },
      "Microsoft.CSharp": {
        "type": "Transitive",
        "resolved": "4.4.1",
        "contentHash": "A5hI3gk6WpcBI0QGZY6/d5CCaYUxJgi7iENn1uYEng+Olo8RfI5ReGVkjXjeu3VR3srLvVYREATXa2M0X7FYJA=="
      },
      "Microsoft.EntityFrameworkCore.Abstractions": {
        "type": "Transitive",
        "resolved": "7.0.4",
        "contentHash": "6GbYvs4L5oFpYpMzwF05kdDgvX09UmMX7MpDtDlGI5ymijFwquwv+yvdijbtodOuu0yLUpc4n71x6eBdJ8v1xQ=="
      },
      "Microsoft.EntityFrameworkCore.Analyzers": {
        "type": "Transitive",
        "resolved": "7.0.4",
        "contentHash": "YRD4bViuaEPEsaBIL52DzXGzLCt3jYoE3wztYEW1QZYDl89hQ+ca0nvBO2mnMHmCXpU/2wlErrUyDp4x5B/3mg=="
      },
      "Microsoft.Extensions.Caching.Abstractions": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "IeimUd0TNbhB4ded3AbgBLQv2SnsiVugDyGV1MvspQFVlA07nDC7Zul7kcwH5jWN3JiTcp/ySE83AIJo8yfKjg==",
        "dependencies": {
          "Microsoft.Extensions.Primitives": "7.0.0"
        }
      },
      "Microsoft.Extensions.Caching.Memory": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "xpidBs2KCE2gw1JrD0quHE72kvCaI3xFql5/Peb2GRtUuZX+dYPoK/NTdVMiM67Svym0M0Df9A3xyU0FbMQhHw==",
        "dependencies": {
          "Microsoft.Extensions.Caching.Abstractions": "7.0.0",
          "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
          "Microsoft.Extensions.Logging.Abstractions": "7.0.0",
          "Microsoft.Extensions.Options": "7.0.0",
          "Microsoft.Extensions.Primitives": "7.0.0"
        }
      },
      "Microsoft.Extensions.Configuration.Abstractions": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "f34u2eaqIjNO9YLHBz8rozVZ+TcFiFs0F3r7nUJd7FRkVSxk8u4OpoK226mi49MwexHOR2ibP9MFvRUaLilcQQ==",
        "dependencies": {
          "Microsoft.Extensions.Primitives": "7.0.0"
        }
      },
      "Microsoft.Extensions.Configuration.Binder": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "b3ErKzND8LIC7o08QAVlKfaEIYEvLJbtmVbFZVBRXeu9YkKfSSzLZfR1SUfQPBIy9mKLhEtJgGYImkcMNaKE0A==",
        "dependencies": {
          "Microsoft.Extensions.Configuration.Abstractions": "6.0.0"
        }
      },
      "Microsoft.Extensions.DependencyInjection": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "elNeOmkeX3eDVG6pYVeV82p29hr+UKDaBhrZyWvWLw/EVZSYEkZlQdkp0V39k/Xehs2Qa0mvoCvkVj3eQxNQ1Q==",
        "dependencies": {
          "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0"
        }
      },
      "Microsoft.Extensions.DependencyInjection.Abstractions": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "h3j/QfmFN4S0w4C2A6X7arXij/M/OVw3uQHSOFxnND4DyAzO1F9eMX7Eti7lU/OkSthEE0WzRsfT/Dmx86jzCw=="
      },
      "Microsoft.Extensions.DependencyModel": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "TD5QHg98m3+QhgEV1YVoNMl5KtBw/4rjfxLHO0e/YV9bPUBDKntApP4xdrVtGgCeQZHVfC2EXIGsdpRNrr87Pg==",
        "dependencies": {
          "System.Buffers": "4.5.1",
          "System.Memory": "4.5.4",
          "System.Runtime.CompilerServices.Unsafe": "6.0.0",
          "System.Text.Encodings.Web": "6.0.0",
          "System.Text.Json": "6.0.0"
        }
      },
      "Microsoft.Extensions.Logging": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "Nw2muoNrOG5U5qa2ZekXwudUn2BJcD41e65zwmDHb1fQegTX66UokLWZkJRpqSSHXDOWZ5V0iqhbxOEky91atA==",
        "dependencies": {
          "Microsoft.Extensions.DependencyInjection": "7.0.0",
          "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
          "Microsoft.Extensions.Logging.Abstractions": "7.0.0",
          "Microsoft.Extensions.Options": "7.0.0"
        }
      },
      "Microsoft.Extensions.Logging.Abstractions": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "kmn78+LPVMOWeITUjIlfxUPDsI0R6G0RkeAMBmQxAJ7vBJn4q2dTva7pWi65ceN5vPGjJ9q/Uae2WKgvfktJAw=="
      },
      "Microsoft.Extensions.Options": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "lP1yBnTTU42cKpMozuafbvNtQ7QcBjr/CcK3bYOGEMH55Fjt+iecXjT6chR7vbgCMqy3PG3aNQSZgo/EuY/9qQ==",
        "dependencies": {
          "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
          "Microsoft.Extensions.Primitives": "7.0.0"
        }
      },
      "Microsoft.Extensions.Options.ConfigurationExtensions": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "bXWINbTn0vC0FYc9GaQTISbxhQLAMrvtbuvD9N6JelEaIS/Pr62wUCinrq5bf1WRBGczt1v4wDhxFtVFNcMdUQ==",
        "dependencies": {
          "Microsoft.Extensions.Configuration.Abstractions": "6.0.0",
          "Microsoft.Extensions.Configuration.Binder": "6.0.0",
          "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
          "Microsoft.Extensions.Options": "6.0.0",
          "Microsoft.Extensions.Primitives": "6.0.0"
        }
      },
      "Microsoft.Extensions.Primitives": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q=="
      },
      "Microsoft.NETCore.Platforms": {
        "type": "Transitive",
        "resolved": "5.0.4",
        "contentHash": "S/AHu+d3Fk/yoWHIXNAs8N030bCf22GlXoMqLC/zK24i+VfhG0kWYtFeEv6s07b05qchNEGabwOcq49zzR8MPA=="
      },
      "Microsoft.Win32.SystemEvents": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "hqTM5628jSsQiv+HGpiq3WKBl2c8v1KZfby2J6Pr7pEPlK9waPdgEO6b8A/+/xn/yZ9ulv8HuqK71ONy2tg67A=="
      },
      "NeoSmart.AsyncLock": {
        "type": "Transitive",
        "resolved": "3.2.1",
        "contentHash": "bYIpqtgA5oZWdSgcsGA4XLkKVYuz6Qc+aEVfTYPOIX2rSFbb8NFxHcBb5V62qio8Q6Au/Xn+7ci86VW9vqIk0w=="
      },
      "Oracle.ManagedDataAccess.Core": {
        "type": "Transitive",
        "resolved": "3.21.90",
        "contentHash": "q1k7i9Im9GPFJzBz9w0sLRlN0MBTWHaAAdanTiHVlpMfVQ/JiKRb5uDVv8bplsMfn2S74WJAXbzwzou/6yb9kg==",
        "dependencies": {
          "System.Diagnostics.PerformanceCounter": "6.0.0",
          "System.DirectoryServices": "5.0.0",
          "System.DirectoryServices.Protocols": "5.0.1"
        }
      },
      "Reynj": {
        "type": "Transitive",
        "resolved": "1.4.2",
        "contentHash": "o8UMzGLnpfP+L5G914j7i+qGFEqyDK3mMcJ2AldGsODiJ4LE6uuEjxAEtsYl/nG7PyO1GNBIa2qKOw/Wa05NrQ=="
      },
      "System.Buffers": {
        "type": "Transitive",
        "resolved": "4.5.1",
        "contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg=="
      },
      "System.ComponentModel.Annotations": {
        "type": "Transitive",
        "resolved": "4.4.1",
        "contentHash": "ToiYqSCioqhtspq2O/jYKtyTC/T0uwWHBTYlzCi6PRbSSHArN1IaRWeHffDamvms5sye5FDUWCfNZgubQpNRsA=="
      },
      "System.Configuration.ConfigurationManager": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
        "dependencies": {
          "System.Security.Cryptography.ProtectedData": "6.0.0",
          "System.Security.Permissions": "6.0.0"
        }
      },
      "System.Diagnostics.DiagnosticSource": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "frQDfv0rl209cKm1lnwTgFPzNigy2EKk1BS3uAvHvlBVKe5cymGyHO+Sj+NLv5VF/AhHsqPIUUwya5oV4CHMUw==",
        "dependencies": {
          "System.Runtime.CompilerServices.Unsafe": "6.0.0"
        }
      },
      "System.Diagnostics.PerformanceCounter": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "gbeE5tNp/oB7O8kTTLh3wPPJCxpNOphXPTWVs1BsYuFOYapFijWuh0LYw1qnDo4gwDUYPXOmpTIhvtxisGsYOQ==",
        "dependencies": {
          "System.Configuration.ConfigurationManager": "6.0.0"
        }
      },
      "System.DirectoryServices": {
        "type": "Transitive",
        "resolved": "5.0.0",
        "contentHash": "lAS54Y3KO1XV68akGa0/GJeddkkuuiv2CtcSkMiTmLHQ6o6kFbKpw4DmJZADF7a6KjPwYxmZnH4D3eGicrJdcg==",
        "dependencies": {
          "Microsoft.NETCore.Platforms": "5.0.0",
          "System.IO.FileSystem.AccessControl": "5.0.0",
          "System.Security.AccessControl": "5.0.0",
          "System.Security.Permissions": "5.0.0",
          "System.Security.Principal.Windows": "5.0.0"
        }
      },
      "System.DirectoryServices.Protocols": {
        "type": "Transitive",
        "resolved": "5.0.1",
        "contentHash": "rqSmdHgoYL8RghMsYcwtzNWKbXdT9wHwYDIDcd9TQkRLO/ptF1Op/BTiBc/AbducFCS/PMcqpttXuzw2hp4Iyg==",
        "dependencies": {
          "Microsoft.NETCore.Platforms": "5.0.4",
          "System.Security.Principal.Windows": "5.0.0"
        }
      },
      "System.Drawing.Common": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "NfuoKUiP2nUWwKZN6twGqXioIe1zVD0RIj2t976A+czLHr2nY454RwwXs6JU9Htc6mwqL6Dn/nEL3dpVf2jOhg==",
        "dependencies": {
          "Microsoft.Win32.SystemEvents": "6.0.0"
        }
      },
      "System.IO.FileSystem.AccessControl": {
        "type": "Transitive",
        "resolved": "5.0.0",
        "contentHash": "SxHB3nuNrpptVk+vZ/F+7OHEpoHUIKKMl02bUmYHQr1r+glbZQxs7pRtsf4ENO29TVm2TH3AEeep2fJcy92oYw==",
        "dependencies": {
          "System.Security.AccessControl": "5.0.0",
          "System.Security.Principal.Windows": "5.0.0"
        }
      },
      "System.Memory": {
        "type": "Transitive",
        "resolved": "4.5.4",
        "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw=="
      },
      "System.Runtime.CompilerServices.Unsafe": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
      },
      "System.Security.AccessControl": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "AUADIc0LIEQe7MzC+I0cl0rAT8RrTAKFHl53yHjEUzNVIaUlhFY11vc2ebiVJzVBuOzun6F7FBA+8KAbGTTedQ=="
      },
      "System.Security.Cryptography.ProtectedData": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "rp1gMNEZpvx9vP0JW0oHLxlf8oSiQgtno77Y4PLUBjSiDYoD77Y8uXHr1Ea5XG4/pIKhqAdxZ8v8OTUtqo9PeQ=="
      },
      "System.Security.Permissions": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "T/uuc7AklkDoxmcJ7LGkyX1CcSviZuLCa4jg3PekfJ7SU0niF0IVTXwUiNVP9DSpzou2PpxJ+eNY2IfDM90ZCg==",
        "dependencies": {
          "System.Security.AccessControl": "6.0.0",
          "System.Windows.Extensions": "6.0.0"
        }
      },
      "System.Security.Principal.Windows": {
        "type": "Transitive",
        "resolved": "5.0.0",
        "contentHash": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA=="
      },
      "System.Text.Encodings.Web": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==",
        "dependencies": {
          "System.Runtime.CompilerServices.Unsafe": "6.0.0"
        }
      },
      "System.Text.Json": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==",
        "dependencies": {
          "System.Runtime.CompilerServices.Unsafe": "6.0.0",
          "System.Text.Encodings.Web": "6.0.0"
        }
      },
      "System.Windows.Extensions": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "IXoJOXIqc39AIe+CIR7koBtRGMiCt/LPM3lI+PELtDIy9XdyeSrwXFdWV9dzJ2Awl0paLWUaknLxFQ5HpHZUog==",
        "dependencies": {
          "System.Drawing.Common": "6.0.0"
        }
      },
      "my.domain": {
        "type": "Project",
        "dependencies": {
          "My.Library": "[7.0.1, )",
          "My.Library.Domain": "[7.0.1, )"
        }
      },
      "my.models": {
        "type": "Project",
        "dependencies": {
          "My.Library": "[7.0.1, )",
          "Reynj": "[1.4.2, )",
          "Sieve": "[2.5.5, )"
        }
      }
    }
  }
}

package.lock.json (7.0.3)

{
  "version": 1,
  "dependencies": {
    "net7.0": {
      "My.Library.EntityFrameworkCore": {
        "type": "Direct",
        "requested": "[7.0.1, )",
        "resolved": "7.0.1",
        "contentHash": "oT1wxlTdVwbeQ5bptEWX5+TBvDXC0uMDdYdXT4F+E+nI/aRezpHixEUB3xLmEcT/pjcOssk7rKEkWAu7On3NEQ==",
        "dependencies": {
          "My.Library": "7.0.1",
          "My.Domain": "7.0.1",
          "Microsoft.EntityFrameworkCore": "7.0.0",
          "Microsoft.EntityFrameworkCore.Relational": "7.0.0"
        }
      },
      "My.Library.Oracle.EntityFrameworkCore": {
        "type": "Direct",
        "requested": "[7.0.1, )",
        "resolved": "7.0.1",
        "contentHash": "O7ZlRwNIiHW8Z+iJmkI4E/vuSec96TEGFc8p0F2Bko+S3bWVayZcy3CcTuf9RDY6377bzreSHnMZmkyrMgRRoA==",
        "dependencies": {
          "Oracle.EntityFrameworkCore": "[7.21.8, 8.0.0)"
        }
      },
      "EFCoreSecondLevelCacheInterceptor": {
        "type": "Direct",
        "requested": "[3.8.5, )",
        "resolved": "3.8.5",
        "contentHash": "JiUXlzUaOtJcj2VW1J4K+gULvAnMOzKItuUKBYm/DAB3iHYXhRZh4ECP+bpxv2lJRCU745GNaltvJLLpvGsrNA==",
        "dependencies": {
          "CacheManager.Core": "1.2.0",
          "EasyCaching.Core": "1.8.0",
          "Microsoft.EntityFrameworkCore": "7.0.0",
          "Microsoft.EntityFrameworkCore.Relational": "7.0.0",
          "NeoSmart.AsyncLock": "3.2.1"
        }
      },
      "LinqKit.Microsoft.EntityFrameworkCore": {
        "type": "Direct",
        "requested": "[7.1.3, )",
        "resolved": "7.1.3",
        "contentHash": "xapQcg5Xu7mj0AJ1568U/+LoWpGjn+YJsBpsD29rmC4285qFBb9PZfUH4CF/TkGzS6OwCEeDv7aMnpKOSKQNBA==",
        "dependencies": {
          "LinqKit.Core": "1.2.3",
          "Microsoft.EntityFrameworkCore": "7.0.0"
        }
      },
      "Microsoft.EntityFrameworkCore": {
        "type": "Direct",
        "requested": "[7.0.3, )",
        "resolved": "7.0.3",
        "contentHash": "6XUI2YGoaLMoP9KGaqWmmd4B2n5bpQbXrVRpH20Et3YjQ0Rn3Ia6HM/ANcSq9rBfjfUySgo9SwUZgQ4m4PF3LQ==",
        "dependencies": {
          "Microsoft.EntityFrameworkCore.Abstractions": "7.0.3",
          "Microsoft.EntityFrameworkCore.Analyzers": "7.0.3",
          "Microsoft.Extensions.Caching.Memory": "7.0.0",
          "Microsoft.Extensions.DependencyInjection": "7.0.0",
          "Microsoft.Extensions.Logging": "7.0.0"
        }
      },
      "Microsoft.EntityFrameworkCore.Relational": {
        "type": "Direct",
        "requested": "[7.0.3, )",
        "resolved": "7.0.3",
        "contentHash": "RxNNjtTrxsMtdBtgoXGRSy8uCXaBHaVzIonTeo7+Ys+N0yEWwhf2E74cxneyunMi13Ezlld10ecCHlDubEU/Pw==",
        "dependencies": {
          "Microsoft.EntityFrameworkCore": "7.0.3",
          "Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
        }
      },
      "Oracle.EntityFrameworkCore": {
        "type": "Direct",
        "requested": "[7.21.9, )",
        "resolved": "7.21.9",
        "contentHash": "TVOkSpclkQ+JR62LotgUwprmRHxQXtkwBpiyLcrkomJ29knF/4i4/eLItkAMfiT8/KWAbkIelNSt1IqCc0+cxg==",
        "dependencies": {
          "Microsoft.EntityFrameworkCore.Relational": "[7.0.0, 8.0.0)",
          "Oracle.ManagedDataAccess.Core": "[3.21.90, 3.22.0)"
        }
      },
      "Scrutor": {
        "type": "Direct",
        "requested": "[4.2.1, )",
        "resolved": "4.2.1",
        "contentHash": "nFNpqlwIcseBIUMlTg25t7qYYLk7S0jrEXpZaPo6rhw8860Gnky8pbCYeDxSfKmIoJdMYtVxkbMENiIZbblm/Q==",
        "dependencies": {
          "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
          "Microsoft.Extensions.DependencyModel": "6.0.0"
        }
      },
      "Sieve": {
        "type": "Direct",
        "requested": "[2.5.5, )",
        "resolved": "2.5.5",
        "contentHash": "JNT/m73vu7lzUfi+DNGVRptWYDJTRhS7BgVwqcvlEq5sAhrMmiFZJxM3LPagjsJbcuscMrmMfLgLvhyDNGv/Bg==",
        "dependencies": {
          "Microsoft.CSharp": "4.4.1",
          "Microsoft.Extensions.Options": "2.0.0",
          "System.ComponentModel.Annotations": "4.4.1"
        }
      },
      "My.Library": {
        "type": "Transitive",
        "resolved": "7.0.1",
        "contentHash": "vgWSTenGu6+NQUHWbfNKHrc2GYsRx2m4jy+RYDrU9FGZjhaWcuPOtdXFBLAzVnk//KK/pcK9GY16Wp8TTj1boA==",
        "dependencies": {
          "Microsoft.Extensions.Logging.Abstractions": "7.0.0"
        }
      },
      "My.Library.Domain": {
        "type": "Transitive",
        "resolved": "7.0.1",
        "contentHash": "XBeoz77YHkmzv0QwH2mkGqQctns0Qnod+iFuNwefw4Gq3CYguiM2EnwISAzb98XOPa3CPaL2/G4TcNJNoUrNQw=="
      },
      "CacheManager.Core": {
        "type": "Transitive",
        "resolved": "1.2.0",
        "contentHash": "tmgwGDJlPNdSTb94Bx/0D3fDlkP+HIa80d1nCrXs+NjTgZR8JaQcslH+PHP2ebxPkM4CnijQVEMD+Dk8CvR41w=="
      },
      "EasyCaching.Core": {
        "type": "Transitive",
        "resolved": "1.8.0",
        "contentHash": "zf+1IpZ2K75dgrgYw+qhOKLlj+m2tiYpMcOtQIPg+t2jPPL12A3mQK8hvMk9wZjujbEdIEQpCctOAYPdF773WQ==",
        "dependencies": {
          "Microsoft.Extensions.DependencyInjection": "6.0.0",
          "Microsoft.Extensions.Logging": "6.0.0",
          "Microsoft.Extensions.Options.ConfigurationExtensions": "6.0.0",
          "System.Diagnostics.DiagnosticSource": "6.0.0"
        }
      },
      "LinqKit.Core": {
        "type": "Transitive",
        "resolved": "1.2.3",
        "contentHash": "Hgew61mrN63v7PK15NpQLTo/0gf0F2KoffSfnspqzXu0VHZH8U0RWaaoE1pfGJUUNhSqyYiodG3fPyYHkFXMhg=="
      },
      "Microsoft.CSharp": {
        "type": "Transitive",
        "resolved": "4.4.1",
        "contentHash": "A5hI3gk6WpcBI0QGZY6/d5CCaYUxJgi7iENn1uYEng+Olo8RfI5ReGVkjXjeu3VR3srLvVYREATXa2M0X7FYJA=="
      },
      "Microsoft.EntityFrameworkCore.Abstractions": {
        "type": "Transitive",
        "resolved": "7.0.3",
        "contentHash": "0NaFBZykUlQHknddRuKY4v+MFZX/AW+v2V85dgj7abIlt+kL3GWa7QNH5S1084VLf1u+dq1SnhZsOvykc3Y0sA=="
      },
      "Microsoft.EntityFrameworkCore.Analyzers": {
        "type": "Transitive",
        "resolved": "7.0.3",
        "contentHash": "CLyRWFLwaOUZNPEia/aBMzFxZqm/ITKt3B+yUFtrg4Ys5VF3n2gvneuItC9IhpeOcjfdSgu/yUKf8y/IsNHs5A=="
      },
      "Microsoft.Extensions.Caching.Abstractions": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "IeimUd0TNbhB4ded3AbgBLQv2SnsiVugDyGV1MvspQFVlA07nDC7Zul7kcwH5jWN3JiTcp/ySE83AIJo8yfKjg==",
        "dependencies": {
          "Microsoft.Extensions.Primitives": "7.0.0"
        }
      },
      "Microsoft.Extensions.Caching.Memory": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "xpidBs2KCE2gw1JrD0quHE72kvCaI3xFql5/Peb2GRtUuZX+dYPoK/NTdVMiM67Svym0M0Df9A3xyU0FbMQhHw==",
        "dependencies": {
          "Microsoft.Extensions.Caching.Abstractions": "7.0.0",
          "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
          "Microsoft.Extensions.Logging.Abstractions": "7.0.0",
          "Microsoft.Extensions.Options": "7.0.0",
          "Microsoft.Extensions.Primitives": "7.0.0"
        }
      },
      "Microsoft.Extensions.Configuration.Abstractions": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "f34u2eaqIjNO9YLHBz8rozVZ+TcFiFs0F3r7nUJd7FRkVSxk8u4OpoK226mi49MwexHOR2ibP9MFvRUaLilcQQ==",
        "dependencies": {
          "Microsoft.Extensions.Primitives": "7.0.0"
        }
      },
      "Microsoft.Extensions.Configuration.Binder": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "b3ErKzND8LIC7o08QAVlKfaEIYEvLJbtmVbFZVBRXeu9YkKfSSzLZfR1SUfQPBIy9mKLhEtJgGYImkcMNaKE0A==",
        "dependencies": {
          "Microsoft.Extensions.Configuration.Abstractions": "6.0.0"
        }
      },
      "Microsoft.Extensions.DependencyInjection": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "elNeOmkeX3eDVG6pYVeV82p29hr+UKDaBhrZyWvWLw/EVZSYEkZlQdkp0V39k/Xehs2Qa0mvoCvkVj3eQxNQ1Q==",
        "dependencies": {
          "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0"
        }
      },
      "Microsoft.Extensions.DependencyInjection.Abstractions": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "h3j/QfmFN4S0w4C2A6X7arXij/M/OVw3uQHSOFxnND4DyAzO1F9eMX7Eti7lU/OkSthEE0WzRsfT/Dmx86jzCw=="
      },
      "Microsoft.Extensions.DependencyModel": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "TD5QHg98m3+QhgEV1YVoNMl5KtBw/4rjfxLHO0e/YV9bPUBDKntApP4xdrVtGgCeQZHVfC2EXIGsdpRNrr87Pg==",
        "dependencies": {
          "System.Buffers": "4.5.1",
          "System.Memory": "4.5.4",
          "System.Runtime.CompilerServices.Unsafe": "6.0.0",
          "System.Text.Encodings.Web": "6.0.0",
          "System.Text.Json": "6.0.0"
        }
      },
      "Microsoft.Extensions.Logging": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "Nw2muoNrOG5U5qa2ZekXwudUn2BJcD41e65zwmDHb1fQegTX66UokLWZkJRpqSSHXDOWZ5V0iqhbxOEky91atA==",
        "dependencies": {
          "Microsoft.Extensions.DependencyInjection": "7.0.0",
          "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
          "Microsoft.Extensions.Logging.Abstractions": "7.0.0",
          "Microsoft.Extensions.Options": "7.0.0"
        }
      },
      "Microsoft.Extensions.Logging.Abstractions": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "kmn78+LPVMOWeITUjIlfxUPDsI0R6G0RkeAMBmQxAJ7vBJn4q2dTva7pWi65ceN5vPGjJ9q/Uae2WKgvfktJAw=="
      },
      "Microsoft.Extensions.Options": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "lP1yBnTTU42cKpMozuafbvNtQ7QcBjr/CcK3bYOGEMH55Fjt+iecXjT6chR7vbgCMqy3PG3aNQSZgo/EuY/9qQ==",
        "dependencies": {
          "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
          "Microsoft.Extensions.Primitives": "7.0.0"
        }
      },
      "Microsoft.Extensions.Options.ConfigurationExtensions": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "bXWINbTn0vC0FYc9GaQTISbxhQLAMrvtbuvD9N6JelEaIS/Pr62wUCinrq5bf1WRBGczt1v4wDhxFtVFNcMdUQ==",
        "dependencies": {
          "Microsoft.Extensions.Configuration.Abstractions": "6.0.0",
          "Microsoft.Extensions.Configuration.Binder": "6.0.0",
          "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
          "Microsoft.Extensions.Options": "6.0.0",
          "Microsoft.Extensions.Primitives": "6.0.0"
        }
      },
      "Microsoft.Extensions.Primitives": {
        "type": "Transitive",
        "resolved": "7.0.0",
        "contentHash": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q=="
      },
      "Microsoft.NETCore.Platforms": {
        "type": "Transitive",
        "resolved": "5.0.4",
        "contentHash": "S/AHu+d3Fk/yoWHIXNAs8N030bCf22GlXoMqLC/zK24i+VfhG0kWYtFeEv6s07b05qchNEGabwOcq49zzR8MPA=="
      },
      "Microsoft.Win32.SystemEvents": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "hqTM5628jSsQiv+HGpiq3WKBl2c8v1KZfby2J6Pr7pEPlK9waPdgEO6b8A/+/xn/yZ9ulv8HuqK71ONy2tg67A=="
      },
      "NeoSmart.AsyncLock": {
        "type": "Transitive",
        "resolved": "3.2.1",
        "contentHash": "bYIpqtgA5oZWdSgcsGA4XLkKVYuz6Qc+aEVfTYPOIX2rSFbb8NFxHcBb5V62qio8Q6Au/Xn+7ci86VW9vqIk0w=="
      },
      "Oracle.ManagedDataAccess.Core": {
        "type": "Transitive",
        "resolved": "3.21.90",
        "contentHash": "q1k7i9Im9GPFJzBz9w0sLRlN0MBTWHaAAdanTiHVlpMfVQ/JiKRb5uDVv8bplsMfn2S74WJAXbzwzou/6yb9kg==",
        "dependencies": {
          "System.Diagnostics.PerformanceCounter": "6.0.0",
          "System.DirectoryServices": "5.0.0",
          "System.DirectoryServices.Protocols": "5.0.1"
        }
      },
      "Reynj": {
        "type": "Transitive",
        "resolved": "1.4.2",
        "contentHash": "o8UMzGLnpfP+L5G914j7i+qGFEqyDK3mMcJ2AldGsODiJ4LE6uuEjxAEtsYl/nG7PyO1GNBIa2qKOw/Wa05NrQ=="
      },
      "System.Buffers": {
        "type": "Transitive",
        "resolved": "4.5.1",
        "contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg=="
      },
      "System.ComponentModel.Annotations": {
        "type": "Transitive",
        "resolved": "4.4.1",
        "contentHash": "ToiYqSCioqhtspq2O/jYKtyTC/T0uwWHBTYlzCi6PRbSSHArN1IaRWeHffDamvms5sye5FDUWCfNZgubQpNRsA=="
      },
      "System.Configuration.ConfigurationManager": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
        "dependencies": {
          "System.Security.Cryptography.ProtectedData": "6.0.0",
          "System.Security.Permissions": "6.0.0"
        }
      },
      "System.Diagnostics.DiagnosticSource": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "frQDfv0rl209cKm1lnwTgFPzNigy2EKk1BS3uAvHvlBVKe5cymGyHO+Sj+NLv5VF/AhHsqPIUUwya5oV4CHMUw==",
        "dependencies": {
          "System.Runtime.CompilerServices.Unsafe": "6.0.0"
        }
      },
      "System.Diagnostics.PerformanceCounter": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "gbeE5tNp/oB7O8kTTLh3wPPJCxpNOphXPTWVs1BsYuFOYapFijWuh0LYw1qnDo4gwDUYPXOmpTIhvtxisGsYOQ==",
        "dependencies": {
          "System.Configuration.ConfigurationManager": "6.0.0"
        }
      },
      "System.DirectoryServices": {
        "type": "Transitive",
        "resolved": "5.0.0",
        "contentHash": "lAS54Y3KO1XV68akGa0/GJeddkkuuiv2CtcSkMiTmLHQ6o6kFbKpw4DmJZADF7a6KjPwYxmZnH4D3eGicrJdcg==",
        "dependencies": {
          "Microsoft.NETCore.Platforms": "5.0.0",
          "System.IO.FileSystem.AccessControl": "5.0.0",
          "System.Security.AccessControl": "5.0.0",
          "System.Security.Permissions": "5.0.0",
          "System.Security.Principal.Windows": "5.0.0"
        }
      },
      "System.DirectoryServices.Protocols": {
        "type": "Transitive",
        "resolved": "5.0.1",
        "contentHash": "rqSmdHgoYL8RghMsYcwtzNWKbXdT9wHwYDIDcd9TQkRLO/ptF1Op/BTiBc/AbducFCS/PMcqpttXuzw2hp4Iyg==",
        "dependencies": {
          "Microsoft.NETCore.Platforms": "5.0.4",
          "System.Security.Principal.Windows": "5.0.0"
        }
      },
      "System.Drawing.Common": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "NfuoKUiP2nUWwKZN6twGqXioIe1zVD0RIj2t976A+czLHr2nY454RwwXs6JU9Htc6mwqL6Dn/nEL3dpVf2jOhg==",
        "dependencies": {
          "Microsoft.Win32.SystemEvents": "6.0.0"
        }
      },
      "System.IO.FileSystem.AccessControl": {
        "type": "Transitive",
        "resolved": "5.0.0",
        "contentHash": "SxHB3nuNrpptVk+vZ/F+7OHEpoHUIKKMl02bUmYHQr1r+glbZQxs7pRtsf4ENO29TVm2TH3AEeep2fJcy92oYw==",
        "dependencies": {
          "System.Security.AccessControl": "5.0.0",
          "System.Security.Principal.Windows": "5.0.0"
        }
      },
      "System.Memory": {
        "type": "Transitive",
        "resolved": "4.5.4",
        "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw=="
      },
      "System.Runtime.CompilerServices.Unsafe": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
      },
      "System.Security.AccessControl": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "AUADIc0LIEQe7MzC+I0cl0rAT8RrTAKFHl53yHjEUzNVIaUlhFY11vc2ebiVJzVBuOzun6F7FBA+8KAbGTTedQ=="
      },
      "System.Security.Cryptography.ProtectedData": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "rp1gMNEZpvx9vP0JW0oHLxlf8oSiQgtno77Y4PLUBjSiDYoD77Y8uXHr1Ea5XG4/pIKhqAdxZ8v8OTUtqo9PeQ=="
      },
      "System.Security.Permissions": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "T/uuc7AklkDoxmcJ7LGkyX1CcSviZuLCa4jg3PekfJ7SU0niF0IVTXwUiNVP9DSpzou2PpxJ+eNY2IfDM90ZCg==",
        "dependencies": {
          "System.Security.AccessControl": "6.0.0",
          "System.Windows.Extensions": "6.0.0"
        }
      },
      "System.Security.Principal.Windows": {
        "type": "Transitive",
        "resolved": "5.0.0",
        "contentHash": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA=="
      },
      "System.Text.Encodings.Web": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==",
        "dependencies": {
          "System.Runtime.CompilerServices.Unsafe": "6.0.0"
        }
      },
      "System.Text.Json": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==",
        "dependencies": {
          "System.Runtime.CompilerServices.Unsafe": "6.0.0",
          "System.Text.Encodings.Web": "6.0.0"
        }
      },
      "System.Windows.Extensions": {
        "type": "Transitive",
        "resolved": "6.0.0",
        "contentHash": "IXoJOXIqc39AIe+CIR7koBtRGMiCt/LPM3lI+PELtDIy9XdyeSrwXFdWV9dzJ2Awl0paLWUaknLxFQ5HpHZUog==",
        "dependencies": {
          "System.Drawing.Common": "6.0.0"
        }
      },
      "my.domain": {
        "type": "Project",
        "dependencies": {
          "My.Library": "[7.0.1, )",
          "My.Library.Domain": "[7.0.1, )"
        }
      },
      "my.models": {
        "type": "Project",
        "dependencies": {
          "My.Library": "[7.0.1, )",
          "Reynj": "[1.4.2, )",
          "Sieve": "[2.5.5, )"
        }
      }
    }
  }
}

@ajcvickers
Copy link
Contributor

@jochenjonc I am not able to reproduce this. Please attach a small, runnable project or post a small, runnable code listing that reproduces what you are seeing so that we can investigate.

@jochenjonc
Copy link
Author

@ajcvickers I created a solution containing 2 projects, one with EF Core 7.0.3 and one with 7.0.4. The EntityTypeConfiguration is the same for both, but when you try to create a migration for the 7.0.4 project you will get an exception.

I thought it was caused by Oracle, but it's actually the RelationalModelValidator from EF Core itself that is throwing the error.

Find my example at https://github.com/jochenjonc/efcore-migration-issue

@0xced
Copy link
Contributor

0xced commented Mar 29, 2023

I forked your project at https://github.com/0xced/efcore-migration-issue and simplified the code to a very minimal reproduction. It's not really a migration issue but a model validation issue.

Run the efcore-7.0.3 project ⇒ ✔️ everything is fine.
Run the efcore-7.0.4 project ⇒ ❌ fails with this exception:

Unhandled exception. System.InvalidOperationException: The comparer for type 'double?' cannot be used for 'Issue.Weight' because its type is 'decimal'.
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelValidator.ValidateTypeMappings(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelValidator.Validate(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.Infrastructure.RelationalModelValidator.Validate(IModel model, IDiagnosticsLogger`1 logger)
   at Oracle.EntityFrameworkCore.Infrastructure.Internal.OracleModelValidator.Validate(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelRuntimeInitializer.Initialize(IModel model, Boolean designTime, IDiagnosticsLogger`1 validationLogger)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.GetModel(DbContext context, ModelCreationDependencies modelCreationDependencies, Boolean designTime)
   at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel(Boolean designTime)
   at Microsoft.EntityFrameworkCore.Internal.DbContextServices.get_Model()
   …

Full source code here (also available in my fork):

using Microsoft.EntityFrameworkCore;

var options = new DbContextOptionsBuilder<IssueDbContext>()
    .UseOracle("Data Source=MyOracleDB;Integrated Security=yes;")
    .ConfigureWarnings(builder => builder.Default(WarningBehavior.Throw))
    .Options;

var context = new IssueDbContext(options);
_ = context.Model; // Throws InvalidOperationException here, only with EF Core 7.0.4 (works fine with 7.0.3)

public record Issue(int Id, string? Name, double? Weight);

public class IssueDbContext : DbContext
{
    public IssueDbContext(DbContextOptions<IssueDbContext> options) : base(options)
    {
    }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        var builder = modelBuilder.Entity<Issue>();
        builder.ToTable("ISSUE");
        builder.HasKey(i => i.Id);
        builder.Property(i => i.Id).HasColumnName("ISSUE_ID");
        builder.Property(i => i.Name).HasColumnName("NAME");
        builder.Property(i => i.Weight).HasColumnName("WEIGHT").HasColumnType("NUMBER(8,5)");
    }
}

Note: remove .HasColumnType("NUMBER(8,5)") and the exception vanishes!

@ajcvickers
Copy link
Contributor

This is a bug in the Oracle provider, which is using a decimal type mapping for a double property:

image

The issue should be reported to Oracle.

As a workaround, the change made in #29985 can be reverted by setting the AppContext switch "Microsoft.EntityFrameworkCore.Issue29985". For example, call this at application start:

AppContext.SetSwitch("Microsoft.EntityFrameworkCore.Issue29985", true);

@jochenjonc
Copy link
Author

Thx, I already reported it on the Oracle forum.

My solution was to add .HasConversion<decimal?>() to force it to decimal. Is that any valid option or will it cause other problems?

@ajcvickers
Copy link
Contributor

@jochenjonc That should be fine.

@jochenjonc
Copy link
Author

@ajcvickers thx, I'll close the issue.

@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Mar 30, 2023
@indrajitjadeja
Copy link

indrajitjadeja commented Apr 4, 2023

This is a bug in the Oracle provider, which is using a decimal type mapping for a double property:

image

The issue should be reported to Oracle.

As a workaround, the change made in #29985 can be reverted by setting the AppContext switch "Microsoft.EntityFrameworkCore.Issue29985". For example, call this at application start:

AppContext.SetSwitch("Microsoft.EntityFrameworkCore.Issue29985", true);

I have taken the same project as a reference shared by @jochenjonc to check the behavior with SQL Server migration.

The model is having Weight property with "double?" type and when I include .HasColumnType("DECIMAL") on same property in OnModelCreating method as below,

public class Issue
{
  public Issue(int id)
  {
    Id = id;
  }
  public int Id { get; }
  public string? Name { get; set; }
  public double? Weight { get; set; }
}


protected override void OnModelCreating(ModelBuilder modelBuilder)
{
  var issueBuilder = modelBuilder.Entity<Issue>();

  issueBuilder.ToTable("ISSUE");

  issueBuilder.HasKey(i => i.Id);

  issueBuilder.Property(i => i.Id)
      .HasColumnName("ISSUE_ID");

  issueBuilder.Property(i => i.Name)
      .HasColumnName("NAME");

  issueBuilder.Property(i => i.Weight)
      .HasColumnName("WEIGHT")
      .HasPrecision(8, 5)
      .HasColumnType("DECIMAL");
}

After migration completes, it maps to the "decimal" data type instead of the double data type, as shown in the Up method below.

protected override void Up(MigrationBuilder migrationBuilder)
{
    migrationBuilder.CreateTable(
        name: "ISSUE",
        columns: table => new
        {
            ISSUEID = table.Column<int>(name: "ISSUE_ID", type: "int", nullable: false)
                .Annotation("SqlServer:Identity", "1, 1"),
            NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
            WEIGHT = table.Column<decimal>(type: "DECIMAL(8,5)", precision: 8, scale: 5, nullable: false)
        },
        constraints: table =>
        {
            table.PrimaryKey("PK_ISSUE", x => x.ISSUEID);
        });
}

sql server migration is converting double to decimal and not throwing such error:

System.InvalidOperationException: The comparer for type 'double?' cannot be used for 'Issue.Weight' because its type is 'decimal'.

The SQL Server EFCore provider also seems to be using SqlServerDecimalTypeMapping for double CLR types. So it doesn't seem the problem is with the type mapping used for Oracle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants