Has anyone experience here with Entity Framework with SQL Anywhere and Mobilink?
The thing with Entity Framework is that the DBContext is not updated when Mobilink synchronization happens, since the data change happens outside the DBContext, so it is not aware of it.
I have tried several things with only moderate success. The best I can do is to refresh the DBContext, but this results in only adding new records to the context. Deleted records are not removed.
Any way on keeping the DBContext after synchronization?
asked 03 Dec '14, 14:05
This is really an Entity Framework question at its core. If you remove the concepts of "MobiLink" and "SQL Anywhere" from your question, you will likely have better luck finding about "How do I refresh a DBContext in Entity Framework?":
Each entity you're working on should have the DbEntityEntry.Reload Method called on it - here's an example:
Remember that the MobiLink server is essentially 'just another ODBC client' and is really just more concurrency happening against your database - the same behaviour could also happen with any other database client while working with Entity Framework.
Can we see the code that you have already tried?
If you're referring to validation, this is a known limitation of Entity Framework - you need to explicitly validate deleted entries:
answered 05 Dec '14, 15:17