This project is read-only.

A first chance exception of type 'NDatabase.Exceptions.LinqQueryException' occurred in NDatabase3.dll

Nov 25, 2013 at 1:42 PM
Edited Nov 25, 2013 at 1:59 PM
I am examining the database for a project that I am developing.
I am getting many messages in the visual studio as the following:

A first chance exception of type 'NDatabase.Exceptions.LinqQueryException' occurred in NDatabase3.dll

About 1000,1500 errors while debugging. is that normal behavior?

This is the code I think is causing this, but I am not sure:
using (IOdb dal = new OdbFactory.Open("c:\\db\\AppDatabase").Start())
       FileLoader loader = new FileLoader(path, Name, ServerName);
       List<StructuredFile> files = loader.LoadFile();
       foreach (StructuredFile structuredFile in files)
           var q = dal.AsQueryable<StructuredFile>();
           var found = (from f in q where f.GuidId.Equals(structuredFile.GuidId) select f).FirstOrDefault();
           if (found == null)
Dec 7, 2013 at 1:58 PM
it is definitely not usual case, so I recommend to take sources and debug what really happens. It could be connected with your objects/project structure and limitations of Linq for NDatabase provider. You could try to use SODA query and see if the issue is still raised.