@David Khaykin it gave me this error Error 2 'PAS.DataClasses1DataContext' does not contain a definition for 'Context' and no extension method 'Context' accepting a first argument of type 'PAS.DataClasses1DataContext' could be found (are you missing a using directive or an assembly reference?) C:\Users\John\Documents\Visual Studio 2010\Projects\PAS\PAS\AddUserWindow.cs 51 25 PAS
–
user962206Feb 24 '12 at 18:38

@user962206: Check the DBML file and make sure the "accounts" table is included; if it is not found in the context, it means the DBML file doesn't contain that table.
–
Dmitriy David KhaykinFeb 24 '12 at 18:42

@user962206 that is correct, DataClasses1DataContext does not contain a property called context; the "context" is the name of the variable that represents your DataClasses1DataContext, in your example, it is "myDbContext"; so if the table name is accounts, and your variable is called myDbContext, then you write myDbContext.accounts.InsertOnSubmit(newUser); myDbContext.SubmitChanges() - just like shown in this answer.
–
Dmitriy David KhaykinFeb 24 '12 at 18:43

@David Khaykin: +1 on the using statment. In fact I'm going to edit to incorporate.
–
Joel EthertonFeb 24 '12 at 18:45