partial void HandleImplementation(CreateElection message) { // Implement your handler logic here. Console.WriteLine("Elections received " + message.GetType().Name); //throw new Exception("Something went wrong!"); Bus.Publish<ElectionCreated>(); }
partial void HandleImplementation(CreateElection message) { // Implement your handler logic here. Console.WriteLine("Elections received " + message.GetType().Name); //throw new Exception("Something went wrong!"); Bus.Publish <ElectionCreated>(); }
public async Task <Election> CreateElectionAsync(CreateElection model) { Election election = _mapper.Map <Election>(model); ValidateElectionCandidate(election.Candidates); election.Address = EthECKey.GenerateKey().GetPublicAddress(); _commonDbContext.Elections.Add(election); await _commonDbContext.SaveChangesAsync(); return(election); }
public void Send(CreateElection message) { Bus.Send(message); }
public async Task <IActionResult> CreateElection(CreateElection election) { await _electionService.CreateElectionAsync(election); return(Ok()); }
public void Send(CreateElection message) { Bus.Send(message); }