public IActionResult Create(Loan model) { if (ModelState.IsValid) { _Loan.Add(model); return(RedirectToAction("Index")); } return(View(model)); }
public ActionResult Index(Loans loan) { try { db.Clear(); db.Add(loan); } catch (Exception e) { _logger.Error(e.Message); } return(RedirectToAction("CheckSite")); }