<p>I've got the following SQL:</p>

<pre><code>select * from transaction_log where stoptime like '%2008%'
</code></pre>

<p>How do I write this in LINQ to SQL syntax?</p>

If you want to use the literal method, it's like this:
```
```
var query = from l in transaction_log
            where SqlMethods.Like(l.stoptime, "%2008%")
            select l;
```
```
Another option is:
```
```
var query = from l in transaction_log
        where l.stoptime.Contains("2008")
        select l;
```
```
If it's a DateTime:
```
```
var query = from l in transaction_log
        where l.stoptime.Year = 2008
        select l;
```
```
That method is in the
System.Data.Linq.SqlClient
namespace