✅ Blazorserver - Value after manual db-update not changing after new fetch
Hello,
I setup a blazorserver project and implemented a db connection and wanted to load user data.
Problem:
My user table has a column called "IsActive" (bit).
Now I fetch a record from a user where the IsActive = 0 and my response user property IsActive = false - so far so good.
Now I manually update the IsActive value on the database to 1 and call the function again to fetch the new information.
Using EF Core btw ... if I run the query which is sent to the sql data provider I get the correct result with isactive = 1, but if I log the response user, the property IsActive is still false.
After I stop the program and restart it, the data gets fetched correctly. It feels like it get cached or smth, no idea why it wont update the value it gets from the query.
Anyone can give me some hints or the solution to this?
I've read smth about ChangeTracking and used AsNoTracking() but that didnt help.
Code Parts:
0 Replies