I have upgraded LLBLGen from 2.0 to 2.5
I am using JCL for the Business Layer (their newest 2.4 release which should be compatible with LLBLGen 2.5)
Code generation was completed OK.
But in my VB.NET application (which now refers to newest runtimes, DAL and BL) I get a whole bunch of errors which are all similar like this:
Error 14 Value of type 'QBO.DAL.HelperClasses.EntityCollection(Of QBO.DAL.EntityClasses.XTArtEntity)' cannot be converted to 'QBO.DAL.HelperClasses.EntityCollection'. C:\QUESTORDOTNET\Questor2007\QN_COMM\clsQuorion2POS.vb 95 23 QN_COMM
which refers to this piece of code (worked just fine before the upgrade):
dim ecXTArt as EntityCollection
ecXTArt = XTArtList.GetXTArtList(bucket)
Reported this to JCL and got the following reply from Bashar:
As for the errors, I understand that you are upgrading from LLBL 1 to 2, right? Because these errors your are facing are LLBL related and not JCL. However, for you info, there are 2 types of entity collections, one uses generics and the other does not. You cannot convert from one type to another. However, we have created a helper function that does a similar job.
I told him we upgraded from 2.0 to 2.5, but haven't heard from him since.
There are 2 workarounds to solve the problem:
1) Declare the entitycollection like this:
Dim ec As QBO.DAL.HelperClasses.EntityCollection(Of QBO.DAL.EntityClasses.XTArtEntity)
ec = QBO.BL.ListClasses.XTArtList.GetXTArtList(Nothing)
2) Or use the JCL helperfunction:
Dim ec As QBO.DAL.HelperClasses.EntityCollection
ec=QBO.BL.Helpers.GenericEntityCollectionAsEntityCollection(QBO.BL.ListClasses.XTArtList.GetXTArtList(Nothing))
This means I have to scan through all the code to change the "GetList" calls
Is this all due to a breaking change in 2.5 ? Or is it caused by JCL ?