You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using EF Core to implement entity updates. After executing method one, there are no changes in the database. However, method two correctly updates the database. The only difference between the two methods is that in method one, userIds is of type IQueryable, while in method two, userIds is of type int[]. Why is it that the entities queried in method one are not being tracked?
@ynanech please submit a minimal, runnable code sample that shows the problem - a snippet isn't enough for us to investigate. Your first variant includes the query on the Users DbSet into the main query - that might not be returning the results you're expecting.
I am using EF Core to implement entity updates. After executing method one, there are no changes in the database. However, method two correctly updates the database. The only difference between the two methods is that in method one, userIds is of type IQueryable, while in method two, userIds is of type int[]. Why is it that the entities queried in method one are not being tracked?
Include provider and version information
EF Core version: 8.0.6
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: NET 8.0
Operating system: Win10
IDE: (e.g. Visual Studio 2022 17.10.3)
The text was updated successfully, but these errors were encountered: