I have this ExecuteUpdate call below inside a for loop and I want to know if it's possible to eliminate the For loop and run ExecuteUpdate as one call?
foreach (var registrant in yogabandEvent.Registrants)
{
result = await _dbContext.Users
.Where(p => p.Id == registrant.UserId)
.ExecuteUpdateAsync(setters => setters
.SetProperty(p => p.Attended, registrant.RegistrantType == RegistrantType.Student ? p => p.Attended + 1 : p => p.Attended)
.SetProperty(p => p.Hosted, (registrant.RegistrantType == RegistrantType.Host || registrant.RegistrantType == RegistrantType.HostInstructor) ? p => p.Hosted + 1 : p => p.Hosted)
.SetProperty(p => p.Instructed, registrant.RegistrantType == RegistrantType.Instructor ? p => p.Instructed + 1 : p => p.Instructed)
);
}