public async Task <IActionResult> Create([Bind("FirstName,LastName,Id")] Teacher teacher) { if (ModelState.IsValid) { teacher.Id = Guid.NewGuid(); await _repository.AddItemAsync(teacher); return(RedirectToAction(nameof(Index))); } return(View(teacher)); }