示例#1
0
        public IActionResult AddFootballer(Footballer model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            FootballerRepository.Add(model);
            FootballerRepository.SaveChanges();
            context.Clients.All.SendAsync("refreshFootballers");
            return(RedirectToAction("index"));
        }