[转]linq to sql like operator

    本文转自:http://blogs.microsoft.co.il/blogs/bursteg/archive/2007/10/16/linq-to-sql-like-operator.aspx<br>原文如下:<br><p>as a response for customer's question, i decided to write about using like operator in linq to sql queries.</p><p>starting from a simple query from northwind database;</p><div style="font-size: 10pt; background: white; color: black; font-family: consolas;"><p style="margin: 0px;"><span style="color: blue;">var</span> query = <span style="color: blue;">from</span> c <span style="color: blue;">in</span> ctx.customers</p><p style="margin: 0px;"> <span style="color: blue;">where</span> c.city == <span style="color: #a31515;">"london"</span></p><p style="margin: 0px;"> <span style="color: blue;">select</span> c;</p>

你可能感兴趣的:(工作)