public async Task Consume(ConsumeContext <CheckOfficeAvailability> context) { var officeId = await _officeBusiness.AvailableOfficesAsync(new CheckOfficeAvailailityCommand { Location = context.Message.Location, StartTime = context.Message.StartTime, EndTime = context.Message.EndTime }); await context.RespondAsync <OfficeAvailabilityRespond>(new { Available = officeId != null, OfficeId = officeId }); }
public async Task <IActionResult> CheckAvailableOffices([FromBody] CheckOfficeAvailailityCommand command) { return(Ok(await _officeBusiness.AvailableOfficesAsync(command))); }