Esempio n. 1
0
        public CarFaxUpdateResult OnUpdateReport(UpdateCarFaxReport command)
        {
            Console.WriteLine(command.ToIndentedJson());

            var reportId = Guid.NewGuid().ToString();

            // This response will be sent back to the caller if it specified
            // a corresponding reply queue when sending the command.
            return(new CarFaxUpdateResult
            {
                ReportId = reportId,
                ReportUrl = $"http://www.carfax.com/reports/{reportId}",
                ResultStatus = "Completed"
            });
        }
        public async Task <IActionResult> CommandWithResponse(UpdateCarFaxReport command)
        {
            await _messaging.SendAsync(command);

            return(Ok("Command Sent"));
        }