I have a product that used an old version of Entity Framework (don't know the version) that I have to update to EF6. In the older EF there used to be a method on an entity called Refresh
to update the table contents. For example:
EFDataEntity.Refresh(RefreshMode.StoreWins, EFDataEntity.TableOne);
to update the EF table TableOne
so that EFDataEntity.TableOne
had the latest data from the SQL table.
On EF6 this method no longer exists. I tried this:
EFDataEntity.Entry(EFDataEntity.TableOne).Reload();
but it throws exception
The entity type DbSet`1 is not part of the model for the current context.
How does one refresh the table in EF6?