public async Task <IActionResult> Create([Bind("ID,Name")] Editor editor) { if (ModelState.IsValid) { _context.Add(editor); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(editor)); }
public async Task <IActionResult> Create([Bind("ID,Name,Description,Price,ImageURL")] Book book) { if (ModelState.IsValid) { _context.Add(book); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(book)); }