Reputation: 271
I have a strange problem when using Entity Framework code first.
When I return an object with dbContext.Users.Where...
I don't get the User
defined in my model, but User_{GUID}
.
Is there anyone who knows this phenomenon and can help?
Regards, Ajit
Upvotes: 1
Views: 90
Reputation: 10509
If your dbContext.Users
if of a type DbSet<User>
then you would get a User
-castable type instance if you query Users
collection.
User_{GUID}
looks like a dynamic proxy object to a User
instance in your DbContext
. Treat it as if it was a User
instance.
Upvotes: 1