private (Resultado Resultado, Guid Id) CriarParticipante(string nome, string email) { var id = Guid.NewGuid(); return(participanteApplicationService.CriarParticipante(new DTO.ParticipanteDTO() { Id = id, Nome = nome, Email = email }).Result, id); }
public override Task <CriarParticipanteReply> CriarParticipante(CriarParticipanteRequest request, ServerCallContext context) { return(Task.Run(() => { var result = participanteApplicationService.CriarParticipante(request.ToParticipanteDTO()).Result; return result.ToCriarParticipanteReply(); })); }
public async Task <IActionResult> Post([FromBody] ParticipanteViewModel participanteViewModel) { var resultado = await participanteApplicationService.CriarParticipante(new Application.DTO.ParticipanteDTO() { Id = participanteViewModel.Id, Nome = participanteViewModel.Nome, Email = participanteViewModel.Email }); return(resultado.ToActionResult()); }
private Guid CriarParticipanteRetornaId() { var participanteId = Guid.NewGuid(); participanteApplicationService.CriarParticipante(new DTO.ParticipanteDTO() { Id = participanteId, Nome = Faker.Name.FullName(), Email = Faker.Internet.Email() }).Wait(); return(participanteId); }
public async override Task <CriarParticipanteReply> CriarParticipante(CriarParticipanteRequest request, ServerCallContext context) { var result = await participanteApplicationService.CriarParticipante(request.ToParticipanteDTO()); return(result.ToCriarParticipanteReply()); }