public async Task OnMessageRequest(ProcessRequest processRequest) { var msg = (Contracts.Customer.Registration)processRequest.Message; Message result = null; var mappedRegistation = new BOCustomer(); var denial = Denial.Create("Kunde kenn ich schon :-(", processRequest.MessageId); await StartProcess("MessageDispatcher", denial, processRequest.SenderId).ConfigureAwait(false); //if (await _customerRepository.CustomerExists(mappedRegistation)) //{ // result = Denial.Create("Der Kunden ist bereits vorhanden", msg.Id); //} //else //{ // result = Confirmation.Create(msg.Id); //} //await StartProcess("MessageDispatcher", result, processRequest.SenderId); }
private async Task OnMessage(ProcessRequest processRequest) { var denial = Denial.Create("Storno gibt es nicht :-)", processRequest.MessageId); await StartProcess("MessageDispatcher", denial, processRequest.SenderId).ConfigureAwait(false); }