public async Task <IActionResult> Create([Bind("Id,UserName,NormalizedUserName,Email,NormalizedEmail,EmailConfirmed,PasswordHash,SecurityStamp,ConcurrencyStamp,PhoneNumber,PhoneNumberConfirmed,TwoFactorEnabled,LockoutEnd,LockoutEnabled,AccessFailedCount")] User user) { if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(user)); }
public async Task <IActionResult> Create([Bind("Id,Canal,User,Notificar")] InscritosCanal inscritosCanal) { if (ModelState.IsValid) { _context.Add(inscritosCanal); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["Canal"] = new SelectList(_context.Canal, "Id", "Id", inscritosCanal.Canal); ViewData["User"] = new SelectList(_context.User, "Id", "Id", inscritosCanal.User); return(View(inscritosCanal)); }