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

Bulk-configuring a value converter sample code typo #4911

Open
adeotek opened this issue Dec 21, 2024 · 0 comments
Open

Bulk-configuring a value converter sample code typo #4911

adeotek opened this issue Dec 21, 2024 · 0 comments

Comments

@adeotek
Copy link

adeotek commented Dec 21, 2024

Type of issue

Typo

Description

In the usage example for the Bulk-configuring a value converter the code contains .HaveConversion<... instead of .HasConversion<....

The code with the typo:

protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder)
{
    configurationBuilder
        .Properties<Currency>()
        .HaveConversion<CurrencyConverter>();
}

The correct version:

protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder)
{
    configurationBuilder
        .Properties<Currency>()
        .HasConversion<CurrencyConverter>();
}

Page URL

https://learn.microsoft.com/en-us/ef/core/modeling/value-conversions?tabs=data-annotations

Content source URL

https://github.com/dotnet/EntityFramework.Docs/blob/main/entity-framework/core/modeling/value-conversions.md

Document Version Independent Id

a26156d1-a4b3-7df0-e63e-b8e9f804abbf

Article author

@ajcvickers

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

No branches or pull requests

1 participant