Esempio n. 1
0
        public IActionResult AddToAgenda(int id, [FromServices] IHttpContextAccessor HttpContextAccessor)
        {
            var speaker       = _speakerRepository.GetBy(id);
            var currentUserId = _userManager.GetUserId(HttpContextAccessor.HttpContext.User);

            _myAgendaRepository.Add(new MyAgenda
            {
                IdSpeaker = speaker.IdSpeaker,
                IdUser    = currentUserId
            });

            return(RedirectToAction(nameof(Index)));
        }
 // GET: Speaker/Details/5
 public ActionResult Details(int id)
 {
     return(View(Map(_speakerRepository.GetBy(id), _conferences)));
 }