Reverting changes to an EntitySet in Linq-to-SQL?

Using (DataContext dc = new DataContext) { } It's the only way to be sure A second best option would be to new up an EntitySet and assign it to the property - same way is done in the designer. Cs file.

Using (DataContext dc = new DataContext) { } It's the only way to be sure. A second best option would be to new up an EntitySet and assign it to the property - same way is done in the designer.Cs file.

Ugh. This is difficult due to how the DataContext is used. I'm looking for a way to avoid this.

– codekaizen Jul 6 '10 at 19:40 thanks for the 2nd option - it looks promising. How do I refresh the entities in the EntitySet after I recreate it? – codekaizen Jul 6 '10 at 20:38 Ok, I solved it by issuing a requery on the context and filling the EntitySet manually.

– codekaizen Jul 6 '10 at 20:56.

I have a Linq-to-SQL context with changes in an EntitySet. I want to get rid of all the changes I made to it since I last called SubmitChanges(). This works fine, except that an EntitySet based on the table doesn't get refreshed, and keeps the changes in it.

What is the best way to reject the modifications in an EntitySet?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions