예제 #1
0
        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
            });
        }
예제 #2
0
 public async Task <IActionResult> CheckAvailableOffices([FromBody] CheckOfficeAvailailityCommand command)
 {
     return(Ok(await _officeBusiness.AvailableOfficesAsync(command)));
 }