I am connecting to a MySQL database from Visual Studio 2010 using Net / Connector.
This is the linq interface request 4 linq:
int timeThreshold = 5;
DateTime cutoffTime = DateTime.Now.AddMinutes(-timeThreshold);
try
{
using (var context = new myEntities())
{
var unprocessedMessages = from m in context.messages
where m.createdDate < cutoffTime
select m;
}
}
catch (Exception e)
{
string exceptionString = e.InnerException.ToString();
}
An exception is thrown in the Results view of the extended unprocessedMessages:
- base {"An error occurred while executing the command definition. For more information, see the internal exception."} System.Data.EntityException {System.Data.EntityCommandExecutionException}
I am trying to understand what an internal exception is. However, the catch block is never entered. What's going on here?
source
share