Home General

Entity Framework 6 - Duplicate Namespace Issue with Custom Driver in LINQPad 5

Hi everyone,

I'm developing a custom driver for LINQPad 5 that uses Entity Framework 6 (EF6) with a DbContext that has a [DbConfigurationType] attribute. However, I'm encountering a "Sequence contains more than one element" error when EF tries to build the model.

The error occurs specifically inside EF6 at this line MslXmlSchemaWriter.cs - Line 46
The problem is that EF6 detects multiple namespaces in the model, which causes SingleOrDefault() to fail.

Could LINQPad be injecting UserQuery or modifying DbContext, leading to the namespace duplication?

Has anyone else encountered multiple namespaces in EF6 only when using LINQPad?

Any insights would be greatly appreciated!

Thanks,
Fred

Sign In or Register to comment.