// // GET: /Milestone/ public ActionResult Index() { using (var db = new BPContext()) { return View(db.Milestones.ToList()); } }
public ActionResult Create(Milestone newMilestone) { try { using (var db = new BPContext()) { db.Milestones.Add(newMilestone); db.SaveChanges(); } return RedirectToAction("Index"); } catch (Exception) { return View(); } }
public AccountRepository(BPContext context) { _context = context; }