c# - How to order by two fields? -


this question has answer here:

how order startdate , userlikeproduct? need sort startdate show userlikeproduct first.

public ienumerable<check> gethomeceeck() {         return this.query()                .where(c => c.ispublish && c.ishomepageproduct)                .orderby(c => c.startdate)                .take(30)                .tolist(); } 

if understand correctly, want order 1 , other?

use .thenby(lambda) after .orderby(lambda).

if not meant let me know , i'll remove answer

.orderby(c => c.startdate).thenby(c => c.like) 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -