How do I fix this code because I keep on getting an error when I run the app
var movies = context.Movies
New Tab X Tri-C Student Blackboard Learn T X Content X Internal Server Error + - R Paused A Not secure localhost:5001 Microsoft.Data.ProviderBase.DbConnectioninternal. TryOpenConnectioninternal(DbConnection outerConnection, DbConnectionFactory connection Factory, TaskCompletionSource
retry, DbConnection Options userOptions) Microsoft.Data.ProviderBase.DbConnectionClosed. TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource retry, DbConnection Options userOptions) Microsoft.Data.SqlClient.SqlConnection. TryOpen(TaskCompletion Source retry) Microsoft.Data.SqlClient.SqlConnection.Open() Microsoft.Entity FrameworkCore.Storage. RelationalConnection.OpenDbConnection(bool errorsExpected) Microsoft.Entity FrameworkCore.Storage. RelationalConnection.Open(bool errorsExpected) Microsoft.Entity FrameworkCore.Storage. RelationalCommand.ExecuteReader(RelationalCommandParameterobject parameterobject) Microsoft.Entity FrameworkCore.Query.Internal.QueryingEnumerable+Enumerator.InitializeReader(DbContext _, bool result) Microsoft. Entity FrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute (TState state, Func operation, Func > verifySucceeded) Microsoft.Entity FrameworkCore.Query.Internal.Querying Enumerable+Enumerator.MoveNext() System.Collections.Generic.List..ctor(IEnumerable collection) System.Linq.Enumerable.ToList(IEnumerable source) MovieList.Controllers.HomeController.Index() in HomeController.cs var movies = context. Movies lambda_method(Closure , object, object[]) Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(object target, object[] parameters) Microsoft.AspNetCore. Mvc.Infrastructure.Action MethodExecutor+SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, object controller, object[] arguments) 19. Type here to search j a Windows Helpline- 1-844-275-7930? 7:57 PM 2/2/2021 New Tab X Tri-C Student BlackBoard Learn Content X 1 Internal Server Error x + X File Edit View Git Analyze Tools Extensions Window Help Search (Ctrl+Q) Ch03Ex2...vieList Ed Project Build Debug Test 12-01 - Debug Debug - Any CPU 1 X Ch04MovieList F 1.1 12 Live Share X Home Controller.cs + x _Layout.cshtml e MovieList MovieList.Controllers.HomeController Indexo 11 Solution Explorer - 1 x A ' . $ - Search Solution Explorer (Ctrl+;) 2 Solution 'Ch03Ex2 MovieList' (1 of 1 project) e MovieList 4 Connected Services Dependencies Properties wwwroot 12 13 14 15 16 O references public HomeController(MovieContext ctx) { context = ctx; = ; } S Server Explorer Toolbox Properties ion Is CSS 17 18 19 20 21 22 23 24 25 26 O references public IActionResult Index() { var movies = context.Movies Include(m => m. Genre) .OrderBy(m => m.Name) .ToList(); return View(movies); 100 % No issues found Ln: 26 Ch: 2 SPC CRLF x js lib bootstrap CSS bootstrap.css bootstrap.css.map bootstrap.min.css > A bootstrap-grid.css bootstrap-reboot.css js > jquery jquery-validate jquery-validation-unobtrusive A favicon.ico Controllers C# HomeController.cs C# MovieController.cs Solution Explorer Class View Git Changes D Output Show output from: Build Package Manager Console Output Error List O Ready 1 Add to Source Control - 12 Type here to search o > . 1 Windows Helpline- 1-844-275-7930? YO 8:00 PM 2/2/2021 D