public async Task <List <String> > GatherAllUserRoles(decimal personId) { var roles = new List <String>(); if (await IsAPatient(personId)) { roles.Add(PatientRoleName); } if (await IsADoctor(personId)) { roles.Add(DoctorRoleName); } roles.AddRange(_repository.GetAll(personId).Select(x => x.Role.Name)); return(roles); }
public async Task <ActionResult <IEnumerable <Userroles> > > GetAllUserroles() { return(Ok(_repository.GetAll())); }