/// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task <IViewComponentResult> InvokeAsync(string userGroupId, string userId)
        {
            if (string.IsNullOrEmpty(userGroupId) || string.IsNullOrEmpty(userId))
            {
                return(new ViewComponentPlaceholder());
            }

            var model = new UserGroupMembershipViewModel()
            {
                UserGroupId = userGroupId,
                UserId      = userId
            };

            var group = await _userGroupManager.GetUserGroupAsync(model.UserGroupId);

            if (group == null)
            {
                return(new ViewComponentPlaceholder());
            }

            var member = await _userGroupManager.GetUserGroupMembershipAsync(model.UserGroupId, model.UserId);

            if (member == null)
            {
                return(new ViewComponentPlaceholder());
            }

            var user = await _userManager.GetUserAsync(model.UserId);

            if (user == null)
            {
                return(new ViewComponentPlaceholder());
            }

            model.AccessLevel         = member.AccessLevel;
            model.AllowEmailMessaging = member.AllowEmailMessaging;
            model.AllowSmsMessaging   = member.AllowSmsMessaging;
            model.UserName            = user.UserName;
            model.Email                = user.Email;
            model.EmailConfirmed       = user.EmailConfirmed;
            model.PhoneNumber          = user.PhoneNumber;
            model.PhoneNumberConfirmed = user.PhoneNumberConfirmed;

            ViewData["ShowAllowMessagingCheckbox"] = true;
            ViewData["AccessLevelSelectList"]      = _enumLocalizer.GetSelectList <AccessLevel>();

            return(View("UserGroupMemberEdit", model));
        }