public IActionResult Create(Quote newQuote) { if (ModelState.IsValid) { string query = $"INSERT INTO quotes (YourName, YourQuote, created_at) VALUES ('{newQuote.YourName}', '{newQuote.YourQuote}', NOW())"; DbConnections.Execute(query); return(RedirectToAction("Quotes")); } else { return(View("Index")); } }