public async Task <IActionResult> Index(string q) { if (string.IsNullOrWhiteSpace(q)) { return(View(null)); } var result = await _search.Search(q); return(View(result)); }
public async Task <ActionResult> Index(string q) { var result = await search.Search(q); var count = q == "jumper" ? 0 : new Random().Next(3, 7); telemetryProvider.TrackEvent("Search", new Dictionary <string, string>() { { "term", q } }, new Dictionary <string, double>() { { "count", count } }); return(View(result)); }
public async Task <IActionResult> Index(string q) { if (string.IsNullOrWhiteSpace(q)) { return(View(null)); } // Telemetry Exercise: start timer here var result = await _search.Search(q); // Telemetry Exercise: stop timer here & compute difference // Telemetry Exercise: collect telemetry data return(View(result)); }
public async Task <ActionResult> Index(string q) { var result = await search.Search(q); return(View(result)); }