Passing multiple parameters to controller in ASP.NET MVC; also, generating on-the-fly queries in LINQ-to-SQL

后端 未结 5 839
南方客
南方客 2020-12-08 01:05

I\'m working on a basic Issue Management System in order to learn ASP.NET MVC. I\'ve gotten it up and running to a fairly decent level but I\'ve run into a problem.

5条回答
  •  有刺的猬
    2020-12-08 02:03

    Instead of the switch, you could use Dynamic Linq which lets you say:

    Issues = Issues.OrderBy("Status");
    

    http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx

提交回复
热议问题