public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,Address,Password")] Member member) { if (ModelState.IsValid) { _context.Add(member); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(member)); }
public async Task <IActionResult> Create([Bind("Id,Title,Author,ReleaseDate,Genre")] Book book) { if (ModelState.IsValid) { _context.Add(book); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(book)); }