Skip to Content
Serverless computing in Azure with .NET
book

Serverless computing in Azure with .NET

by Sasha Rosenbaum
August 2017
Intermediate to advanced
468 pages
12h 5m
English
Packt Publishing
Content preview from Serverless computing in Azure with .NET

Updating controllers and views

Let's execute the following steps for updating controllers and views:

  1. In your project tree, browse to the Controllers folder and add the following TweetsController class. This controller will load the DB context and populate the tweet scores list. The controller class code is below:
        using System.Linq;        using Microsoft.AspNetCore.Mvc;        using TextScoreDashboard.Models;        namespace TextScoreDashboard.Controllers        {          public class TweetsController : Controller          {            private TextScoresDBContext _context;            public TweetsController(TextScoresDBContext context)            {              _context = context;            }            public IActionResult Index()            {              return View(_context.TweetTextScore.ToList());            }          }       }
  1. Under the Views folder, add a folder called Tweets.
  2. In the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Azure Serverless Computing

Mastering Azure Serverless Computing

Lorenzo Barbieri, Massimo Bonanni
Implementing Azure: Putting Modern DevOps to Use

Implementing Azure: Putting Modern DevOps to Use

Florian Klaffenbach, Oliver Michalski, Markus Klein, Mohamed Wali

Publisher Resources

ISBN: 9781787288393Supplemental Content