예제 #1
0
        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);
        }
예제 #2
0
 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());
        }
예제 #4
0
        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);
        }
예제 #5
0
        public async override Task <CriarParticipanteReply> CriarParticipante(CriarParticipanteRequest request, ServerCallContext context)
        {
            var result = await participanteApplicationService.CriarParticipante(request.ToParticipanteDTO());

            return(result.ToCriarParticipanteReply());
        }