public ActionResult Create(Arrear model) { try { db.Arrears.Add(model); db.SaveChanges(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Delete(int id, Arrear model) { try { var veresiyee = db.Arrears.Where(i => i.Arrearıd == id).SingleOrDefault(); db.Arrears.Remove(veresiyee); db.SaveChanges(); return(RedirectToAction("Index")); } catch { return(View()); } }