views:

240

answers:

1

//It must be tagged by RIA Services also, but I can't find this tag.

I loading data on client from server.

var context = new WordsDomainContext();
context.LoadWords();

And I using my collection context.Words on client as I need. It's working good. But I want to refresh my context.Words for some reasons. When I call again context.LoadWords() new record just append to current collection. I tryed use MergeOption context.LoadWords(null, MergeOption.OverwriteCurrentValues, null) but no effect.

How I can clean my Words collection and load new data from server?

+1  A: 

You probably need to call this before you use the LoadWords.

context.Refresh(System.Data.Objects.RefreshMode.StoreWins, context.LoadWords);

Pieter Breed