To jest mój kod:Entity Framework 5.0. Co jest nie tak z moim zapytaniem?
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;
}
jeśli zadzwonię contractsStartDate.Min()
wystąpi wyjątek:
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.
Co jest nie tak z moim Query?
contractsStartDate
jest typuSystem.Data.Entity.Infrastructure.DbQuery
EF 5,0
databaseContext
jest dzieckiemSystem.Data.Entity.DbContext
@GalacticCowboy - JustAnotherUserYouMayKnow ma wierną odpowiedź) to było null :(Dziękuję!) – MikroDel