public async Task <List <UnitRole> > GetRolesForUnitAsync(int unitId) { var roles = await _unitRolesRepository.GetAllRolesByUnitIdAsync(unitId); if (roles != null && roles.Any()) { return(roles.ToList()); } else { return(new List <UnitRole>()); } }
public async Task <List <UnitRole> > GetRolesForUnitAsync(int unitId) { var roles = await _unitRolesRepository.GetAllRolesByUnitIdAsync(unitId); return(roles.ToList()); }