Ejemplo n.º 1
0
        public async Task <ActionResult> LoeschenBestaetigt(int anmeldungId)
        {
            // TODO: test, valid id, invalid id
            try
            {
                Anmeldung anmeldung = await _anmeldungRepository.GetByIdAsync(anmeldungId);

                string guid = anmeldung.SchulungGuid;
                await _anmeldungRepository.Delete(anmeldung);

                return(Redirect("/Schulung/Teilnehmerliste/" + guid));
            }
            catch (Exception e)
            {
                logger.Error(e);
                string code = "#304";
                e = new Exception("Fehler beim Verarbeiten des Inputs " + code, e);
                return(View("Error", e));
            }
        }