public async Task <IActionResult> Create([Bind("ID,Text,EnterDate,Order")] Note note) { if (ModelState.IsValid) { _context.Add(note); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(note)); }
public async Task <IActionResult> Create([Bind("ID,Content,Order")] Sticky sticky) { if (ModelState.IsValid) { _context.Add(sticky); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(sticky)); }