Created
December 28, 2016 06:13
-
-
Save cincauhangus/2df9753da1706d14f9113b822eea8883 to your computer and use it in GitHub Desktop.
Linq to SQL Conversions
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
| Dim value = "F!NDM3" | |
| ' strColumn LIKE '%F!NDM3%' | |
| Dim results1 = (From row In table Where row.strColumn.Contains(value) Select id) | |
| ' strColumn LIKE 'F!NDM3%' | |
| Dim results2 = (From row In table Where row.strColumn.StartsWith(value) Select id) | |
| ' strColumn LIKE '%F!NDM3' | |
| Dim results3 = (From row In table Where row.strColumn.EndsWith(value) Select id) | |
| ' strColumn LIKE 'F!NDM3' | |
| Dim results4 = (From row In table Where System.Data.Linq.SqlClient.SqlMethods.Like(row.strColumn, value) Select id) | |
| ' strColumn = 'F!NDM3' | |
| Dim results5 = (From row In table Where String.equals(row.strColumn, value) Select id) | |
| ' strColumn = 'F!NDM3' | |
| Dim results6 = (From row In table Where row.strColumn.equals(value) Select id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment