Пример #1
0
        public async Task <IActionResult> EventUser(string userId)
        {
            try
            {
                var dto = await _eventUserManager.EventUserAsync(userId, User);

                var model = _mapper.Map <EventUserDTO, EventUserViewModel>(dto);

                return(View(model));
            }
            catch
            {
                return(RedirectToAction("HandleError", "Error", new { code = 500 }));
            }
        }
Пример #2
0
        public async Task <IActionResult> GetEventUserByUserId(string userId)
        {
            var eventUserModel = await _eventUserManager.EventUserAsync(userId, User);

            return(Ok(eventUserModel));
        }