// GET: Agendamentos/Delete/5
        public async Task <IActionResult> Cancelar(Guid id)
        {
            await _agendamentoService.Cancelar(id, AppSettings.Usuario);

            if (_agendamentoService.Invalid)
            {
                TempData["Notificacao"] = new BadRequestDto(_agendamentoService.Notifications, TipoNotificacao.Warning);
            }
            else
            {
                TempData["Notificacao"] = new BadRequestDto(new List <Notification>()
                {
                    new Notification("CancelarAgendamento", "Agendamento cancelado com sucesso.")
                }, TipoNotificacao.Success);
            }

            ViewBag.Controller = "Agendamentos";
            return(View("_Confirmacao"));
        }