Exemplo n.º 1
0
        public async Task AddAsync(AccountAuthorityModel model)
        {
            var accountAuthority = new MasterAccountAuthority
            {
                AccountId   = model.AccountId,
                AuthorityId = model.AuthorityId
            };

            await _accountAuthorityRepository.AddAsync(accountAuthority);
        }
Exemplo n.º 2
0
        public async Task AddUserRoleAsync(AccountModel account, string role)
        {
            var authority = await _authorityService.GetByNameAsync(role);

            var accountAuthority = new AccountAuthorityModel
            {
                AccountId   = account.AccountId,
                AuthorityId = authority.AuthorityId,
            };

            await _accountAuthorityService.AddAsync(accountAuthority);
        }