DotNetSolutions
Showing posts with label
Linq
.
Show all posts
Showing posts with label
Linq
.
Show all posts
Wednesday, January 19, 2011
Delete Query in Linq in asp.net
MyLinqDataClassesDataContext mylinq = new MyLinqDataClassesDataContext();
var deleteuser = from p in mylinq.userCredentials
where p.uname_db.Contains(TextBox3.Text)
select p;
mylinq.userCredentials.DeleteAllOnSubmit(deleteuser);
mylinq.SubmitChanges();
Insert Query in Linq in asp.net
protected void btn_insert_Click(object sender, EventArgs e)
{
var userInsert = new userCredential()
{
uname_db = TextBox1.Text,
password_db = TextBox2.Text
};
mylinq.userCredentials.InsertOnSubmit(userInsert);
mylinq.SubmitChanges();
}
Older Posts
Home
Subscribe to:
Posts (Atom)