
Custom Search
tblcandidateData cdata = new tblcandidateData();
tcdata.FirstName = txtfirstname.Text;
tcdata.LastName = txtlastname.Text;
tcdata.EMail = txtfstemail.Text;
tcdata.CellPhone = txtcellphone.Text;
tcdata.Address = txtaddress.Text;
tcdata.City = txtcity.Text;
tcdata.CreatedOn = System.DateTime.Now.Date;
tcdata.Rate = Convert.ToDecimal(txtrate.Text);
dc.tblcandidateDatas.InsertOnSubmit(tcdata);
dc.SubmitChanges();
tcdata.FirstName = txtfirstname.Text;
tcdata.LastName = txtlastname.Text;
tcdata.EMail = txtfstemail.Text;
tcdata.CellPhone = txtcellphone.Text;
tcdata.Address = txtaddress.Text;
tcdata.City = txtcity.Text;
tcdata.CreatedOn = System.DateTime.Now.Date;
tcdata.Rate = Convert.ToDecimal(txtrate.Text);
dc.tblcandidateDatas.InsertOnSubmit(tcdata);
dc.SubmitChanges();
Select Statement Using Linq in asp.net
var candidates = from p in dc.tblcandidatedatas where p.PartnerId == pid select p;
grvCandidates.DataSource = candidates;
grvCandidates.DataBind();
this is useful for entityframework learners...
ReplyDelete