protected override async Task OnInitializedAsync() { var response = await _assessmentService.GetAssesments(); if (response.isSuccessful) { Assessments = response.data.OrderByDescending(u => u.CreatedOn).ToList(); ClientAssessments = Assessments.ToList(); } else { Console.Write(response.message); } }
private void RefreshAssessments(string searchText) { if (!string.IsNullOrEmpty(searchText)) { ClientAssessments = Assessments.Where(u => u.Name.Contains(searchText, StringComparison.OrdinalIgnoreCase)).ToList(); StateHasChanged(); } else { ClientAssessments = Assessments.ToList(); StateHasChanged(); } }