Skip to content

glen-84/efcore-repros

Repository files navigation

EF Core reproductions

dotnet/efcore#30197

Setup

  • Start a MySQL container: docker run --name efcore-repros -p 3306:3306 -e MYSQL_ROOT_PASSWORD=secret -e MYSQL_DATABASE=efcore_repros -d mysql:latest
  • Run dotnet ef dbcontext script and execute the SQL.

Reproduction

  • Run with dotnet run.
  • Load http://localhost:5234.
  • See exception System.InvalidCastException: Invalid cast from 'System.String' to 'Api.ArticleTitle'.
  • Expected: Allow comparison with the underlying string type.
  • The entrypoint is in Program.cs L20.
  • The value object (ArticleTitle) is created using the Vogen library.
  • There is a second custom-made value object (ArticleTitle2.cs) for testing without Vogen.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages