I have this call that returns an array of treatments
var procedures = await client.GetProceduresAsync(clinicId);
I was trying to loop and insert all procedureIds (from the array) into an array property of the availableSlotsQuery
var availableSlotsQuery = new AvailableSlotsQuery();
foreach (var procedure in procedures.Select(x=> x.Procedure))
{
availableSlotsQuery = new AvailableSlotsQuery
{
ClinicId = clinicId,
ProcedureIds = new [] { procedure.Id},
Start = request.From.ToDateTimeOffset(),
End = request.To.ToDateTimeOffset(),
CaregiverId = therapistId?.Id
};
}
This is not working.
ProcedureIds is a string [] but after looping I only have one id in the ProcedureIds property
what am I doing wrong here?