Add "Apply migrations" section to MVC validation tutorial#36817
Add "Apply migrations" section to MVC validation tutorial#36817wadepickett merged 12 commits intomainfrom
Conversation
…rted versions Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
Added a note about reviewing the app and improving methods.
wadepickett
left a comment
There was a problem hiding this comment.
Approved after several corrections commited.
Add links to new field tutorial per tdykstra review Co-authored-by: Wade Pickett <wpickett@microsoft.com>
|
@copilot, these files related to this tutorial series: new-field.md, new-field8.md new-field7.md, new-field6.md. Replace this line: with this line containing the updated link: |
… migrations links in new-field tutorials Agent-Logs-Url: https://github.com/dotnet/AspNetCore.Docs/sessions/6b4f3ff0-45af-46b6-aafa-bde7f5bf725e Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
Done in bf186d1. Updated the intro line in |
|
Closing and reopening to force new bulid. |
Fixes #10429
The ASP.NET Core MVC validation tutorial (Part 9) was missing guidance on running an EF Core migration after adding validation attributes that affect the database schema — leaving the model and DB schema out of sync. The Razor Pages equivalent tutorial already had this section.
Changes
Validation tutorial (
validation.mdand versioned includes for 6.0–9.0)## Apply migrationssection after "Using DataType Attributes" and before "Additional resources" invalidation.md(≥ aspnetcore-10.0) andvalidation6.md–validation9.md[Part 8, Add a new field (EF Core migrations)](xref:tutorials/first-mvc-app/new-field)link to Additional resources in all validation tutorial files, to help readers who don't follow the series sequentially find the migrations contextThe new section explains that
[Required]→NOT NULLand[StringLength(60)]→nvarchar(60), and provides tabbed migration commands:ALTER TABLElimitations, consistent with Part 8)New field tutorial (
new-field.mdand versioned includes for 6.0–8.0)new-field.md(aspnetcore-10.0),new-field6.md,new-field7.md, andnew-field8.mdto link directly to EF Core migrations docs:[Entity Framework](/ef/core/get-started/aspnetcore/new-db) Migrations/Code First Migrations[Entity Framework Core migrations](/ef/core/managing-schemas/migrations/)Metadata
ms.dateand addedai-usage: ai-assistedtovalidation.mdfrontmatter💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.
Internal previews