LINQPad has suddenly started failing to run queries using an Entity Framework assembly. Everything seems to be in order, so I'm a bit confused why it's not working. My app works fine.
The error is:
'UserQuery': cannot derive from sealed type 'My.Entity.Framework.CustomDataContext'
Any ideas on how to get this working again? I can find no mention of this error online.
UserQuery
is the type that contains your code in LinqPad. If you use a custom Entity Framework context from your own assembly, UserQuery inherits from this context class. But in your case it seems that your custom EF context class is sealed, so you can't inherit from it.
If for some reason you can't "unseal" it, don't try to use the LinqPad data connection system; just reference the assembly containing your EF context and create an instance of the context explicitly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With