public async Task <IActionResult> Create([Bind("Name,Date,RaceTrackId")] Race race) { if (ModelState.IsValid) { await _service.AddAsync(race); return(RedirectToAction(nameof(Index))); } ViewData["RaceTrackId"] = new SelectList(_context.RaceTracksInfo, "Id", "Name", race.RaceTrackId); return(View(race)); }