by Rahul Singla | Mar 12, 2017 | .Net, Coding, Entity Framework, LINQ, Tech |
A few days ago, I was working on some Entity Framework stuff where I encountered the following logic for applying sort expressions to the EF query: var query = this.context.users.AsQueryable(); if (sort == "username") { if (sortDir == "ASC") { query = query.OrderBy(u...