none
OR in Linq RRS feed

  • Question

  • How do I say OR in a LINQ expression?

     

    var a = (from o in dc.Languages

    where o.Model.Contains(prefixText)

    OR o.Type.Contains(prefixText)

    select o).Take(count);

    Tuesday, October 7, 2008 12:27 PM

Answers

  •  

    Hi

     

    var a = (from o in dc.Languages

    where o.Model.Contains(prefixText)

    || o.Type.Contains(prefixText)

    select o).Take(count);

    Tuesday, October 7, 2008 12:36 PM
    Answerer

All replies