The following usually works:
Context.Refresh(RefreshMode.StoreWins, _
Context.ObjectStateManager.GetObjectStateEntries())
It sometimes causes problems with EntityRelations. look at my comment for further details.
More Related Contents:
- ASP.NET MVC 2.0 Implementation of searching in jqgrid
- Code First: Independent associations vs. Foreign key associations?
- Unique Key constraints for multiple columns in Entity Framework
- Entity Framework 6 Code first Default value
- Database first create entity framework 6.1.1 model using system.data.sqlite 1.0.93
- EF Code First “Invalid column name ‘Discriminator'” but no inheritance
- How do I detect a page refresh using jquery?
- Improve navigation property names when reverse engineering a database
- How do I refresh a page using JavaScript?
- One time page refresh after first page load
- How to configure ProviderManifestToken for EF Code First
- Can I specify global mapping rules in Entity Framework Code First?
- The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid
- Entity Framework loading child collection with sort order
- “like” queries in Entity Framework
- Equivalent for .HasOptional in Entity Framework Core 1 (EF7)
- Ramifications of DbSet.Create versus new Entity()
- How to pass parameters to the DbContext.Database.ExecuteSqlCommand method?
- Keyword not supported: “data source” initializing Entity Framework Context
- Entity Framework Data Annotations Set StringLength VarChar
- EF 4.1 loading filtered child collections not working for many-to-many
- How to map Table per Type (TPT) inheritance in Entity designer?
- How do I remove underscore of foreign key fields in code first by convention
- Entity Framework Validation confusion – maximum string length of ‘128’
- Number of members in conceptual type does not match with number of members on object side type
- Delete an object and all of its related entities in Entity Framework
- LINQ To Entities + Include + Anonymous type issue
- Entity Framework Core 2.0 – Run migrations step by step
- EF4 LINQ Ordering Parent and all child collections with Eager Loading (.Include())
- Can anyone spot why I keep getting this error testing the EF 5 beta