Saturday 26 January 2013

Use IN Clause In LInqToSQL (vb.net)

Example #1 : The IN will be fetch from textbox against a field of Type Integer


Dim in_values = Me.TextBox1.Text.Split(vbCrLf).ToList.Select(Function (f) CInt(f)).ToList

Dim query = From t In db.table
            Where in_values.Contains(t.integer_field.Value) 
            Select t




No comments:

Post a Comment