Multiple Order By

Question

I have two tables, movies and categories, and I get an ordered list by categoryID first and then by Name. The movie table has three columns, ID, Name, and CategoryID. The category table two has columns, ID, and Name. I tried something like the following, but it didn't work.
var movies = _db.Movies.OrderBy( m => { m.CategoryID, m.Name })

Answer

This should work for you:
Var movies = _db.Movies.OrderBy(c => c.Category).ThenBy(n => n.Name)
Source

No comments:

HOWTO: Repair Logitech M325 Mouse

FixIt says that you will find single screw under CE label. It isn't always true.