public async Task <Guid> AdicionarParticipanteAsync(ParticipanteEventoRequest request)
        {
            ParticipanteEvento model = ConverterParticipanteParaModel(request);

            ValidacoesParticipanteEvento(model);

            await _repository.InsertParticipantes(model);

            return(model.Id);
        }
 /// <summary>
 /// Converte EventoRequest para Evento
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 private ParticipanteEvento ConverterParticipanteParaModel(ParticipanteEventoRequest request)
 {
     return(new ParticipanteEvento(request.EventoId, request.FunionarioId, request.ConvidadoId,
                                   request.ValorComida, request.ValorBebida, request.ConvidadoComBebida, request.FuncioanrioComBebida));
 }
Beispiel #3
0
 public async Task <IActionResult> AdicionarParticipantes(ParticipanteEventoRequest request)
 {
     return(Ok(await appService.AdicionarParticipanteAsync(request)));
 }