Home

InsertOnSubmit - assembly reference

Hello,

I'm new to the forum and to LINQPad. I just got my activation code for the premium version today hoping I could work on some simple insert commands.

I can't seem to get InsertOnSubmit to work, and have been unable to find help in the forum or in other forums.

I have an OData service and a table I'm writing to. I have been able to write to it from other sources other than LINQPad so I know I can get it to work.

Here is the code I am trying to use:

Fee_Waived f = new Fee_Waived()
{
BANK_ID = 1,
EMPLOYEE = "TEST",
DEPARTMENT = "TEST",
DATE = new DateTime(2014, 01, 01),
ACCOUNT_NUMBER = 1,
AMOUNT_REFUNDED = new Decimal(9.99),
REFUND_REASON = "TESTING"
};
Fee_Waived.InsertOnSubmit(f);
SubmitChanges();

I get the error:
'System.Data.Services.Client.DataServiceQuery<LINQPad.User.Fee_Waived>' does not contain a definition for 'InsertOnSubmit' and no extension method 'InsertOnSubmit' accepting a first argument of type 'System.Data.Services.Client.DataServiceQuery<LINQPad.User.Fee_Waived>' could be found (press F4 to add a using directive or assembly reference)

I tried pressing F4 and adding System.Data.Linq reference, and also the namespaces. No luck.

What should I do?

Thanks in advance for any help and advice.

Comments

Sign In or Register to comment.