Exemplo n.º 1
0
 public ActionResult <Agendamentos> PostAmbientes(Agendamentos agendamento)
 {
     try
     {
         _agendamentoService.Cadastrar(agendamento);
         return(CreatedAtAction("GetAgendamentos", new { id = agendamento.AgendamentoId }, agendamento));
     }
     catch (Exception)
     {
         return(BadRequest());
     }
 }
Exemplo n.º 2
0
        public void Cadastrar(CadastroViewModel cadastroViewModel)
        {
            var agendamento = mapper.Map <Agendamento>(cadastroViewModel);

            agendamentoService.Cadastrar(agendamento);
        }