SubSonic-3.0 icon indicating copy to clipboard operation
SubSonic-3.0 copied to clipboard

Allow Contains on a List

Open sestocker opened this issue 15 years ago • 3 comments

      replies = from n in Note.All()
      where n.ParentNoteId != null && noteList.Contains(n.ParentNoteId.Value)
      select n  

(Where noteList in either a list of strings or Guids)

see http://stackoverflow.com/questions/2073257/subsonic-query-construction-for-containsguid for more info.

sestocker avatar Jan 18 '10 14:01 sestocker

Can be worked around, see stackoverflow answer for details

adam7 avatar Feb 21 '10 19:02 adam7

I know a work-around is available. I am the originator of the SO question. Contains support on par with Linq to SQL is desirable - this is just one example.

sestocker avatar Feb 21 '10 21:02 sestocker

I built an experimental enhancement to the mysql provider for this. I'm posting it up for review. If it works, it should be pretty easy to apply to the other providers.

nathanb avatar Sep 03 '10 18:09 nathanb