public void ProvisionRole(ProvisionRoleCommand command) { var tenantId = new TenantId(command.TenantId); var tenant = _tenantRepository.Get(tenantId); var role = tenant.ProvisionRole(command.RoleName, command.Description, command.SupportsNesting); _roleRepository.Add(role); }
public void ProvisionRole(ProvisionRoleCommand command) { var tenantId = Guid.Parse(command.TenantId); var tenant = this.tenantRepository.Get(tenantId); var role = tenant.ProvisionRole(command.RoleName, command.Description, command.SupportsNesting); this.roleRepository.Add(role); this.unitOfWork.Commit(); }