Skip to content

Commit

Permalink
Added tracing for Azure demo
Browse files Browse the repository at this point in the history
  • Loading branch information
nikmd23 committed Jun 3, 2014
1 parent c279a5a commit 74e9a29
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Demo/MiLB.Web/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Web.Mvc;
Expand All @@ -14,16 +15,19 @@ public class HomeController : Controller

public ActionResult Index()
{
Trace.TraceInformation("Displaying home page.");
return View(dataContext.Mascots.Where(m => m.IsHero).Single());
}

public ActionResult All()
{
Trace.TraceInformation("Displaying all mascots.");
return View(dataContext.Mascots.ToList());
}

public ActionResult League(string id)
{
Trace.TraceInformation("Displaying mascots from league with id: " + id);
var mascots = dataContext.Mascots
.Where(m => m.Team.League.Slug.Equals(id, StringComparison.InvariantCultureIgnoreCase));

Expand All @@ -40,6 +44,7 @@ public void ThirdPartyScript()

public ActionResult Champions()
{
Trace.TraceInformation("Displaying Mascot Mania winners.");
var mascots = dataContext.Mascots.Where(m => m.IsChampion).ToList();

return View(mascots);
Expand Down

0 comments on commit 74e9a29

Please sign in to comment.