public void InsertUserData(List <UserData> data) { //create new data context var dataSpace = new dataLinqDataContext(); //get needed table from data context var usrTable = dataSpace.GetTable <usersTestTable>(); usersTestTable tbl; bool online = false; //query and parsing here: foreach (UserData userdat in data) { tbl = new usersTestTable(userdat.name, userdat.email, userdat.passHash, userdat.gender, userdat.userpic.ToString(), online); dataSpace.usersTestTables.InsertOnSubmit(tbl); } try { dataSpace.SubmitChanges(); } catch (Exception e) { Console.WriteLine(e); } //Close data context dataSpace.Dispose(); // throw new NotImplementedException(); }
partial void DeleteusersTestTable(usersTestTable instance);
partial void UpdateusersTestTable(usersTestTable instance);
partial void InsertusersTestTable(usersTestTable instance);