2017-04-09 09:51:01 +08:00
---
2018-03-20 07:40:34 +08:00
title: Controller methods and views in ASP.NET Core
2017-04-09 09:51:01 +08:00
author: rick-anderson
2018-03-20 07:40:34 +08:00
description: Learn how to work with controller methods, views, and DataAnnotations in ASP.NET Core.
2017-04-09 09:51:01 +08:00
manager: wpickett
2018-01-29 23:21:31 +08:00
ms.author: riande
2017-04-09 09:51:01 +08:00
ms.date: 04/07/2017
ms.prod: asp.net-core
2018-01-29 23:21:31 +08:00
ms.technology: aspnet
ms.topic: get-started-article
2017-04-09 09:51:01 +08:00
uid: tutorials/first-mvc-app-xplat/controller-methods-views
---
2018-03-20 07:40:34 +08:00
# Controller methods and views in ASP.NET Core
2017-04-09 09:51:01 +08:00
By [Rick Anderson ](https://twitter.com/RickAndMSFT )
2018-01-24 23:27:24 +08:00
We have a good start to the movie app, but the presentation isn't ideal. We don't want to see the time (12:00:00 AM in the image below) and **ReleaseDate** should be two words.
2017-04-09 09:51:01 +08:00
![Index view: Release Date is one word (no space) and every movie release date shows a time of 12 AM ](../../tutorials/first-mvc-app/working-with-sql/_static/m55.png )
Open the *Models/Movie.cs* file and add the highlighted lines shown below:
2018-02-25 00:08:11 +08:00
[!code-csharp[ ](../../tutorials/first-mvc-app/start-mvc/sample/MvcMovie/Models/MovieDate.cs?name=snippet_1&highlight=2,11-12 )]
2017-04-09 09:51:01 +08:00
Build and run the app.
<!-- include start
![MVC Movie application open browser showing movie data ](../../tutorials/first-mvc-app/working-with-sql/_static/m55.png )
-->
[!INCLUDE[adding-model ](../../includes/mvc-intro/controller-methods-views.md )]
>[!div class="step-by-step"]
2017-04-15 01:46:51 +08:00
[Previous - Working with SQLite ](working-with-sql.md )
2017-09-20 15:36:55 +08:00
[Next - Add search ](search.md )