public async Task <ActionResult> Bookings()
        {
            var user = await _userManager.FindByNameAsync(User.Identity.Name);

            if (user == null)
            {
                return(NotFound($"Unable to load user with ID'{_userManager.GetUserId(User)}'."));
            }
            else
            {
                user = _adminUserRepository.GetById(user.Id);
            }
            return(View(user));
        }
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var user = _adminUserRepository.GetById(id);

            if (user == null)
            {
                return(NotFound());
            }

            return(View(user));
        }
Example #3
0
 public AdminUserDto GetById(int id)
 {
     try
     {
         return(rep.GetById(id).MapTo <AdminUserDto>());
     }
     catch (Exception)
     {
         throw;
     }
 }