// Filtered access: Guest/Admin. public async Task <IActionResult> ListOccupancy() { var result = await(IsAdmin ? resService.GetOccupancies() : resService.GetActiveOccupancies()); return(Ok(result)); }