public async Task AddAsync(AccountAuthorityModel model) { var accountAuthority = new MasterAccountAuthority { AccountId = model.AccountId, AuthorityId = model.AuthorityId }; await _accountAuthorityRepository.AddAsync(accountAuthority); }
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); }