public async Task <IActionResult> Create([Bind("Id,Name, Author, reader, comment")] Book book) { if (ModelState.IsValid) { _context.Add(book); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(book)); }
public async Task <IActionResult> Create([Bind("Id,name,sirname,age,interests")] People people) { if (ModelState.IsValid) { _context.Add(people); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(people)); }