0

I've got a C#-Statement in LINQpad 4.0 like this:

var x = (from y in MyTable
where y.ID == 12345
select y).Single(); 
x.PropA = "abc";
SubmitChanges();

When i execute the Statements i get the error The name "SubmitChanges" is not available in the current context

How can i fix the problem or update my data using linqpad? On my research i just found something about using a second datacontext, but it should work with the first context...

2 Answers2

1

Most likely, you've not set a database (connection). Choose a database from the dropdown list above the query, or drag a connection from the Schema Explorer on the left onto your query.

Joe Albahari
  • 30,118
  • 7
  • 80
  • 91
0

For the Entity Framework, you'll need to use the method SaveChanges() msdn.

Devin
  • 23
  • 7