1
vote
2answers
2k views

Search and Filter in MVC3 Razor I am using Linq, is there a better way to do this

Heres my Code and it works fine. I just dont like all the If else, what If I keep adding field to filter, its going to get messy. Ps: I am not using EF and cannot on this. Thanks. CONTROLLER CODE ...
3
votes
1answer
261 views

Need help with cleaning up this Controller

I've written the following controller and i was looking for some input/advice on how i could go about cleaning this up or rewriting it. I feel like i'm repeating myself a lot or that there might be a ...
2
votes
2answers
571 views

Repetition in Controller code

In the index view a user can search with any combination of one to all of the following parameters: firstname, lastname or ssn. The found search results are displayed in the search results view. In my ...
3
votes
3answers
500 views

Not feeling 100% about my Controller design.

Basically, I'm uploading an excel file and parsing the information then displaying what was parsed in a view. using System.Data; using System.Data.OleDb; using System.Web; using System.Web.Mvc; using ...