Linq dynamic queries for user search screens

前端 未结 2 412
鱼传尺愫
鱼传尺愫 2021-01-15 15:35

I have a database that has a user search screen that is \"dynamic\" in that I can add additional search criteria on the fly based on what columns are available in the partic

2条回答
  •  日久生厌
    2021-01-15 15:45

    As for your first question, you can do this using Dynamic Linq as described by Scott Gu here

    var query = Northwind.Products.Where("Lastname LIKE "test%");
    

提交回复
热议问题