Search code examples
c#sql.netlinqdb4o

Basic LINQ query to SQL C#


I have this LINQ query in C# for querying a db4o database.

IEnumerable<internetRecord> searchResult = from internetRecord ie in database
                                           where ie.GSrecordID.Contains(txtSearchString.Text)
                                           select ie;

What would be the equivalent query in SQL? (needed for comparison purposes) I have not worked with SQL much in the past and looking at it after using LINQ for a while it seems confusing.


Solution

  • SELECT *
    FROM MyTable
    WHERE GSRecordID LIKE '%txtSearchString%'