This is my code:
public DateTime GibSomeStartDate(IEnumerable<int> partnerNumbers, DateTime startTime)
{
var contractsStartDate = from contract in this.databaseContext.Contract
where partnerNumbers.Contains(contract.Pnr)
&& contract.SomeDateTime >= startTime
select contract.SomeDateTime;
}
if I call there contractsStartDate.Min()is an Exception:
Unable to create a null constant value of type 'System.Collections.Generic.IEnumerable`1'. Only entity types, enumeration types or primitive types are supported in this context.
What is wrong with my request?
source
share