public static tbl_reg Createtbl_reg(int id) { tbl_reg tbl_reg = new tbl_reg(); tbl_reg.id = id; return(tbl_reg); }
protected void Button1_Click(object sender, EventArgs e) { tbl_reg tr = new tbl_reg(); tr.fname = fname.Text; tr.lname = lname.Text; dc.tbl_regs.InsertOnSubmit(tr); dc.SubmitChanges(); }
public ActionResult Insert(first f) { tbl_reg tr = new tbl_reg(); tr.fname = f.fname; tr.lname = f.lname; dc.tbl_reg.Add(tr); dc.SaveChanges(); ViewBag.msg = "Insert Successfully"; return(View()); }
partial void Deletetbl_reg(tbl_reg instance);
partial void Updatetbl_reg(tbl_reg instance);
partial void Inserttbl_reg(tbl_reg instance);
public void AddTotbl_reg(tbl_reg tbl_reg) { base.AddObject("tbl_reg", tbl_reg); }