public void OnGet() { Appointments = appointmentData.GetAppointmentForUser(this.User.Identity.Name); var check4 = this.User.HasClaim("http://schemas.microsoft.com/ws/2008/06/identity/claims/role", "Administator"); if (!Appointments.Any()) { Message = "You don't have any appointments"; } }