Book Image

SignalR Real-time Application Cookbook

By : Roberto Vespa
Book Image

SignalR Real-time Application Cookbook

By: Roberto Vespa

Overview of this book

Table of Contents (18 chapters)
SignalR Real-time Application Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Creating an MVC controller and a related view


Let's add a default controller by opening the context menu on our MVC web application and then navigating to Add | Scaffold…. From there, let's select the MVC 5 Controller – Empty option and give it a name, as shown in the following screenshot:

Our controller will have an Index() method; for our recipes, we'll just need to add a view for that method in the same way we would do for every other controller action (we'll name it index.cshtml), as shown in the following screenshot:

Visual Studio will create the specified file with some basic HTML content.