public async Task <IActionResult> Create([Bind("Id,Nombre,Email,Asunto,Telefono,Mensaje")] Contacto contacto) { if (ModelState.IsValid) { _context.Add(contacto); await _context.SaveChangesAsync(); //return RedirectToAction(nameof(Index)); return(RedirectToAction("Index", "Home")); } return(View(contacto)); }
public async Task <IActionResult> Create([Bind("Id,Email")] Suscriptor suscriptor) { if (ModelState.IsValid) { _context.Add(suscriptor); await _context.SaveChangesAsync(); //return RedirectToAction(nameof(Index)); return(RedirectToAction("Index", "Home")); } return(View(suscriptor)); }