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