Beispiel #1
0
        public async Task <IActionResult> Crear([Bind("ID,Marca,Modelo,Folio,Color,TipoTransmision,DescripcionEstetica,SolicitudID")] Auto auto)
        {
            if (ModelState.IsValid)
            {
                _context.Add(auto);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Details", "Solicitudes", new { id = auto.SolicitudID }));
            }
            return(RedirectToAction("Details", "Solicitudes", new { id = auto.SolicitudID }));
        }
Beispiel #2
0
        public async Task <IActionResult> Create([Bind("SolicitudID,Fecha,NumeroLote")] Solicitud solicitud)
        {
            if (ModelState.IsValid)
            {
                _context.Add(solicitud);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(solicitud));
        }