LINQ问题 [英] LINQ question
本文介绍了LINQ问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开始学习LINQ,我认为这很好,但是我有一个问题.
我如何在SQL中使用%编写linq查询,我可以从* FIRST_NAME类似于"AL%"的客户那里选择*".我该如何在LINQ中翻译该SQL查询.
谢谢!
I''m started learning LINQ and I think that is great but i have one problem.
How I can use % in writing linq queries, in SQL i could „SELECT * FROM CUSTOMERS WHERE FIRST_NAME LIKE ''AL%''". How I can that SQL query translate in LINQ.
Thanks!
推荐答案
您可以说item.FirstName.StartsWith("AL")
here i am posting some thing about Linq basic operation select, insert, delete, update.
http://suhasharidas.blogspot.in/2012/08/create- linq-to-sql-connection-with.html [ ^ ]
http://suhasharidas.blogspot.in/2012/08/create-linq-to-sql-connection-with.html[^]
这篇关于LINQ问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文