Example #1
0
 public async Task Update()
 {
     if (Collection is List <Faculty> facultyList)
     {
         facultyList[facultyList.FindIndex(r => r.Id == Current.Id)] = Current;
     }
     else
     {
         Collection = await FacultyService.GetAsync().ConfigureAwait(false);
     }
     StateHasChanged();
     Current = await FacultyService.UpdateAsync(Current).ConfigureAwait(false);
 }