public async Task <IActionResult> Create([Bind("Id,EmailAddress")] Owner owner) { if (ModelState.IsValid) { _context.Add(owner); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(owner)); }
public async Task <IActionResult> Create([Bind("Id,OwnerId,RowLabel,ColLabel,ColNumbers,RowNumbers")] Board board) { if (ModelState.IsValid) { _context.Add(board); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["OwnerId"] = new SelectList(_context.Owners, "Id", "Id", board.OwnerId); return(View(board)); }