DataContext dbContext = new DataContext("data Source=192.168.0.66;database=LSS1;user id=sa;pwd=xit");
//User为 数据映射类
Table<User> users = dbContext.GetTable<User>();
var result = from user in users
where user.UserName == this.txtUserName.Text.Trim() //删除条件
select user;
//执行删除操作
users.DeleteAllOnSubmit(result);
dbContext.SubmitChanges();