コード例 #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);
 }