Esempio n. 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"));
        }
Esempio n. 2
0
 public void CreateFootballer(Footballer footballer)
 {
     footballerRepository.Add(footballer);
 }