dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.58k stars 25.3k forks source link

Decimal truncation warning not received #33040

Closed Rillian-Grant closed 2 months ago

Rillian-Grant commented 2 months ago

Description

The following warning is displayed, which is addressed in a later step:

No type was specified for the decimal column 'Price' on entity type 'Movie'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values using 'HasColumnType()'.

I didn't receive this warning using dotnet-ef version 8.0.7.

PS P:\RazorPagesMovie> dotnet ef migrations add InitialCreate   
Build started...
Build succeeded.
Done. To undo this action, use 'ef migrations remove'

Page URL

https://learn.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/model?view=aspnetcore-8.0&tabs=visual-studio-code

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/tutorials/razor-pages/model.md

Document ID

7096fdb3-612e-9e00-bd0b-8ea4886a09ce

Article author

@wadepickett


Associated WorkItem - 291121

wadepickett commented 2 months ago

Thanks @Rillian-Grant! I'll take a look at it.