Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Commit fc594e5

Browse files
davidfowlDamianEdwards
authored andcommitted
Small nits
1 parent b35e04e commit fc594e5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/3. Add front-end, render agenda, set up front-end models.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -515,18 +515,18 @@ In this session, we'll add the front end web site, with a public (anonymous) hom
515515
[ApiController]
516516
public class SearchController : ControllerBase
517517
{
518-
private readonly ApplicationDbContext _db;
518+
private readonly ApplicationDbContext _context;
519519

520-
public SearchController(ApplicationDbContext db)
520+
public SearchController(ApplicationDbContext context)
521521
{
522-
_db = db;
522+
_context = context;
523523
}
524524

525525
[HttpPost]
526526
public async Task<ActionResult<List<SearchResult>>> Search(SearchTerm term)
527527
{
528528
var query = term.Query;
529-
var sessionResults = await _db.Sessions.Include(s => s.Track)
529+
var sessionResults = await _context.Sessions.Include(s => s.Track)
530530
.Include(s => s.SessionSpeakers)
531531
.ThenInclude(ss => ss.Speaker)
532532
.Where(s =>
@@ -535,7 +535,7 @@ In this session, we'll add the front end web site, with a public (anonymous) hom
535535
)
536536
.ToListAsync();
537537

538-
var speakerResults = await _db.Speakers.Include(s => s.SessionSpeakers)
538+
var speakerResults = await _context.Speakers.Include(s => s.SessionSpeakers)
539539
.ThenInclude(ss => ss.Session)
540540
.Where(s =>
541541
s.Name.Contains(query) ||

0 commit comments

Comments
 (0)