Hi I'm using the following line of code to get the maximum date from a businesslistbase collection:
dtMaxJobStartDate = oJob.MyWipJobAllMatCollection.Max(
Function(m) (m.SupplyDate))But I get the following exception at runtime:
System.ArgumentException: The type or method has 2 generic parameter(s), but 1 generic argument(s) were provided. A generic argument must be provided for each generic parameter..
This is the Stack Trace:
System.RuntimeType.SanityCheckGenericArguments(Type[] genericArguments, Type[] genericParamters)
System.Reflection.RuntimeMethodInfo.MakeGenericMethod(Type[] methodInstantiation)
Execute(Expression expression) in D:\PI Custom\CSLA\CSLA35\cslavb-3.5.1-080804\cslavb\Csla\Linq\CslaQueryProvider.vb: line 261
Execute[TResult](Expression expression) in D:\PI Custom\CSLA\CSLA35\cslavb-3.5.1-080804\cslavb\Csla\Linq\CslaQueryProvider.vb: line 198
TResult](IQueryable`1 source, Expression`1 selector)
TestSetJobStartAndEndDate(WipMaster& oJob, InvWarehouseCollection oATPQueriedInvWarehouseRecords) in ...
Can anyone advise where I should look? Am I doing something wrong?
And so I immediately downloaded v3.5.2 and cleaned and rebuilt my solution, but the test still fails with the same error:
Test method TestUIP.SupportingServicesTest.TestUpdateJobDatesFromATPNonStockedJob threw exception: System.ArgumentException: The type or method has 2 generic parameter(s), but 1 generic argument(s) were provided. A generic argument must be provided for each generic parameter..
The stack trace has changed slightly to indicate the file paths to the v3.5.2 csla files...
System.RuntimeType.SanityCheckGenericArguments(Type[] genericArguments, Type[] genericParamters)
System.Reflection.RuntimeMethodInfo.MakeGenericMethod(Type[] methodInstantiation)
Execute(Expression expression) in D:\PI Custom\CSLA\CSLA35\cslavb-3.5.2-081009\cslavb\Csla\Linq\CslaQueryProvider.vb: line 261
Execute[TResult](Expression expression) in D:\PI Custom\CSLA\CSLA35\cslavb-3.5.2-081009\cslavb\Csla\Linq\CslaQueryProvider.vb: line 198
TResult](IQueryable`1 source, Expression`1 selector)
UIP.SupportingServices.SetJobStartAndEndDate(WipMaster& oJob, InvWarehouseCollection oATPQueriedInvWarehouseRecords) in d:\PI Custom\UIP\Services\UpdateJobDates.vb: line 65
UIP.SupportingServices.UpdateJobDeliveryDatesFromATPQuery(WipMasterCollection& oJobs, InvWarehouseCollection oATPQueriedInvWarehouseRecords, Boolean blnPostToSyspro) in d:\PI Custom\UIP\Services\UpdateJobDates.vb: line 16
TestUIP.SupportingServicesTest.TestUpdateJobDatesFromATPNonStockedJob() in D:\PI Custom\TestUIP\UpdateJobDateFromATPQueryTest.vb: line 88
Any other ideas? Is there perhaps something wrong with the line of code I'm using to extract the max date value?
Copyright (c) Marimer LLC