From 168356113186f0736143f4e0eea39887eb9e865d Mon Sep 17 00:00:00 2001 From: Fan Yang <52458914+fanyang-mono@users.noreply.github.com> Date: Wed, 8 Apr 2026 17:43:26 -0400 Subject: [PATCH] Fix build failures for MvcMovie90 app (#36955) * Fix build failures * Fix build failure for MvcMovie10 --- .../start-mvc/sample/MvcMovie10/Models/ErrorViewModel.cs | 8 ++++++++ .../start-mvc/sample/MvcMovie10/Models/SeedDataRating.cs | 3 +-- .../start-mvc/sample/MvcMovie90/Models/ErrorViewModel.cs | 8 ++++++++ .../start-mvc/sample/MvcMovie90/Models/SeedDataRating.cs | 3 +-- 4 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie10/Models/ErrorViewModel.cs create mode 100644 aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie90/Models/ErrorViewModel.cs diff --git a/aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie10/Models/ErrorViewModel.cs b/aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie10/Models/ErrorViewModel.cs new file mode 100644 index 000000000000..9c0d973b2eb6 --- /dev/null +++ b/aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie10/Models/ErrorViewModel.cs @@ -0,0 +1,8 @@ +namespace MvcMovie.Models; + +public class ErrorViewModel +{ + public string? RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); +} diff --git a/aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie10/Models/SeedDataRating.cs b/aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie10/Models/SeedDataRating.cs index 58a0650f9ad5..e0cc3e930f45 100644 --- a/aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie10/Models/SeedDataRating.cs +++ b/aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie10/Models/SeedDataRating.cs @@ -1,5 +1,4 @@ -#define SeedRating -#if SeedRating +#if SeedRating using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; diff --git a/aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie90/Models/ErrorViewModel.cs b/aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie90/Models/ErrorViewModel.cs new file mode 100644 index 000000000000..9c0d973b2eb6 --- /dev/null +++ b/aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie90/Models/ErrorViewModel.cs @@ -0,0 +1,8 @@ +namespace MvcMovie.Models; + +public class ErrorViewModel +{ + public string? RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); +} diff --git a/aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie90/Models/SeedDataRating.cs b/aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie90/Models/SeedDataRating.cs index 58a0650f9ad5..e0cc3e930f45 100644 --- a/aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie90/Models/SeedDataRating.cs +++ b/aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie90/Models/SeedDataRating.cs @@ -1,5 +1,4 @@ -#define SeedRating -#if SeedRating +#if SeedRating using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection;