public ActionResult Index(tblRegistration obj) { if (ModelState.IsValid) { MvcDbStokEntities db = new MvcDbStokEntities(); db.tblRegistration.Add(obj); db.SaveChanges(); } return(View(obj)); }
public BaseRepository() { db = new MvcDbStokEntities(); table = db.Set <T>(); }