Created
August 11, 2011 06:53
-
-
Save DylanLacey/1139045 to your computer and use it in GitHub Desktop.
Broken LINQing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var returnShift = | |
All().Aggregate( | |
(x, y) => | |
(x.start.Ticks - desiredStartTime.Ticks) < (y.start.Ticks - desiredStartTime.Ticks) ? x : y); | |
Error message: | |
Expression of type 'System.Collections.Generic.IEnumerable`1[ShiftyEyes.Model.Shift]' cannot be used for parameter of type 'System.Linq.IQueryable`1[ShiftyEyes.Model.Shift]' of method 'ShiftyEyes.Model.Shift Aggregate[Shift](System.Linq.IQueryable`1[ShiftyEyes.Model.Shift], System.Linq.Expressions.Expression`1[System.Func`3[ShiftyEyes.Model.Shift,ShiftyEyes.Model.Shift,ShiftyEyes.Model.Shift]])' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment