I'm rather new to the DynamicProxy world, so I need some well advices.
For the test aims, I create the entities like this:
dynamic instance = Activator.CreateInstance(entityType, new object[] { connectionString });
The instance has been created successfully:
If to cast some dynamic properties of instance and itself to some strictly typed variables, so there is no problem too:
But the problem begins when I try to fetch the result from the dynamic proxy. I'm rather confused how to fetch it...
Because Linq methods can't be done with the casted DbSet object like:
.Select(value => value).ToList();
So, what am I doing wrong and how to fetch all records from the Context obtained by the dynamic proxy?
Aucun commentaire:
Enregistrer un commentaire