Hello,
we were using your product dotConnect for MySQL ver5.20 since last year
and our LINQ code was working perfectly.
But now we have shifted to newer version of the same ie.5.70
After reapplying the references to our project (.NET 3.5 console app)
we are facing some strange errors like
.First() method is throwing exception: "sequence contains no elements."
.Refresh() method is throwing an exception: "value cannot be null: param entities".
our code lines are as follows:
A
this.dc.Refresh(RefreshMode.KeepChanges);
trace:
System.ArgumentNullException was caught
Message="Value cannot be null.\r\nParameter name: entities"
Source="Devart.Data.Linq"
ParamName="entities"
StackTrace:
at Devart.Data.Linq.DataContext.Refresh(RefreshMode mode, Object[] entities)
at CLEO.BO.Document.SaveDocument(String strStatus) in D:\CLEO\trunk\service\CLEO\CLEO\Document.cs:line 390
at CLEO.BO.Document.Draft() in D:\CLEO\trunk\service\CLEO\CLEO\Document.cs:line 326
at CLEO.BO.DocumentManager.Create(IWorkflowable doc, String strWorkflow, Boolean blnDraft) in D:\CLEO\trunk\service\CLEO\CLEO\DocumentManager.cs:line 137
InnerException:
B
Categories objCategory = dbcon.Categories.Where(a => a.Category == strParentCat).FirstOrDefault();
both the codelines were working before, but not now.
second exception was solved by using .FirstOrDefault() method.
but why these errors are occurring now and not before.????
please note that all the references are given properly to newer assemblies after the v5.70 installation.. we are able to build our project successfully. It means these are runtime errors.
Please help us out.