コード例 #1
0
        public async Task <IActionResult> OnPostAsync(IEnumerable <string> RoleIds, int accountId)
        {
            if (!RoleIds.Any() || accountId <= 0)
            {
                return(Ok(false));
            }
            await sysRoleAdminUserInfoService.AddAsync(RoleIds, accountId);

            return(Ok(true));
        }
コード例 #2
0
        public async Task <IActionResult> OnPostAsync([FromBody] GrantRoleDto grantRoleDto)
        {
            await sysRoleAdminUserInfoService.AddAsync(grantRoleDto.RoleIds, grantRoleDto.AccountId);

            return(Ok(true));
        }