public async Task <IActionResult> Create([Bind("Id,Title,Content,Author,Date,Tags")] Post post) { if (ModelState.IsValid) { _context.Add(post); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(post)); }
public async Task <IActionResult> Create([Bind("Id,Yorum,Nick,Konu")] Comment comment) { if (ModelState.IsValid) { _context.Add(comment); await _context.SaveChangesAsync(); return(RedirectToAction("Index", "Home")); } return(View(comment)); }