I have a linq query to insert data into a table. but it does not work. I saw an example on the Internet trying to do so, but it doesn't seem to work.
Tablename: login has 3 user columns, username and password. I set userid as auto increment in the database. So I need to insert only username and password each time. Here is my code.
linq_testDataContext db = new linq_testDataContext(); login insert = new login(); insert.username = userNameString; insert.Password = pwdString; db.logins.Attach(insert);// tried to use Add but my intellisence is not showing me Add.I saw attach but dosent seems to work. db.SubmitChanges();
source share