2017-04-10 08:52:07 +08:00
|
|
|
---
|
2017-07-01 07:47:15 +08:00
|
|
|
title: Adding Search
|
2017-04-10 08:52:07 +08:00
|
|
|
author: rick-anderson
|
|
|
|
description: Shows how to add search to simple ASP.NET Core MVC app
|
|
|
|
keywords: ASP.NET Core,
|
|
|
|
ms.author: riande
|
|
|
|
manager: wpickett
|
|
|
|
ms.date: 04/07/2017
|
2017-06-01 05:55:29 +08:00
|
|
|
ms.topic: get-started-article
|
2017-04-10 08:52:07 +08:00
|
|
|
ms.assetid: d69e5529-ffff-4628-855d-200206d96269
|
|
|
|
ms.technology: aspnet
|
|
|
|
ms.prod: asp.net-core
|
|
|
|
uid: tutorials/first-mvc-app-xplat/search
|
|
|
|
---
|
|
|
|
|
|
|
|
[!INCLUDE[adding-model](../../includes/mvc-intro/search1.md)]
|
|
|
|
|
|
|
|
Note: SQLlite is case sensitive, so you'll need to search for "Ghost" and not "ghost".
|
|
|
|
|
|
|
|
[!INCLUDE[adding-model](../../includes/mvc-intro/search2.md)]
|
|
|
|
|
|
|
|
Change the `<form>` tag in the *Views\movie\Index.cshtml* Razor view to specify `method="get"`:
|
|
|
|
|
|
|
|
```html
|
|
|
|
<form asp-controller="Movies" asp-action="Index" method="get">
|
|
|
|
```
|
|
|
|
|
|
|
|
[!INCLUDE[adding-model](../../includes/mvc-intro/search3.md)]
|
|
|
|
|
|
|
|
>[!div class="step-by-step"]
|
2017-04-15 01:46:51 +08:00
|
|
|
[Previous - Controller methods and views](controller-methods-views.md)
|
|
|
|
[Next - Add a field](new-field.md)
|