I have two tables, movies
and categories
, and I get an ordered list by categoryID first and then by Name .
(我有两个表, movies
和categories
,我首先按类别ID获取有序列表,然后按名称获取 。)
The movie table has three columns ID, Name and CategoryID .
(影片表有三列ID,Name和CategoryID 。)
The category table has two columns ID and Name . (类别表有两列ID和名称 。)
I tried something like the following, but it didn't work.
(我尝试了类似下面的内容,但它没有用。)
var movies = _db.Movies.OrderBy( m => { m.CategoryID, m.Name })
ask by Sasha translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…