AspNetCore.Docs/aspnetcore/tutorials/first-mvc-app-mac/controller-methods-views.md

1.4 KiB

title author description keywords ms.author manager ms.date ms.topic ms.assetid ms.technology ms.prod uid
Controller methods and views in an ASP.NET Core MVC app rick-anderson Working with controller methods, views and DataAnnotations ASP.NET Core, riande wpickett 04/07/2017 get-started-article c7313211-babe-babe-babe-8e72603cc0ce aspnet asp.net-core tutorials/first-mvc-app-mac/controller-methods-views

Controller methods and views in an ASP.NET Core MVC app

By Rick Anderson

We have a good start to the movie app, but the presentation is not ideal. We don't want to see the time (12:00:00 AM in the following image) and ReleaseDate should be two words.

Index view: Release Date is one word (no space) and every movie release date shows a time of 12 AM

Open the Models/Movie.cs file and add the highlighted lines shown below:

[!code-csharpMain]

Build and run the app.

[!INCLUDEadding-model]

[!div class="step-by-step"] Previous - Working with SQLite Next - Add search