I have a drop down list that is used to filter data from a table. The drop down list has two items: with xx and without xx.
How do I construct a L2S query to filter a table?
An example SQL call is
SELECT * FROM ProductionTasks WHERE Designation like '% xx %'
There is a controller named TaskDatabaseController.cs and the database with the ProductionTasks table is named MyDatabase.
preguntado el 09 de marzo de 12 a las 14:03
I am not exactly sure what you have asked here.
If you need the
linq query for above sql statement
var db = new YourDataContext(); var task = from ptask in db.ProductionTasks where ptask.Designation.Contains("xx") select ptask;