public IActionResult AddFootballer(Footballer model) { if (!ModelState.IsValid) { return(View(model)); } FootballerRepository.Add(model); FootballerRepository.SaveChanges(); context.Clients.All.SendAsync("refreshFootballers"); return(RedirectToAction("index")); }
public void CreateFootballer(Footballer footballer) { footballerRepository.Add(footballer); }