breeze - BreezeJS query orderBy length? -
i have breeze query fetch values database.
if want order values alphabetically, query looks this:
var query = entityquery.from("words") .orderby("text"); the thing want sort values returned first length, alphabetically.
for example, set of results ordered alphabetically:
a ab b bb how make ordered this:
a b ab bb ??
i know can write function order data way want after it's returned server, i'm wondering if it's possible change query data sorted described above changing query?
you can accomplish adding additional filter step on server before sending data client.
[httpget] public iqueryable<word> words() { return contextprovider.context.words.tolist().orderby(customorderbyimpl; } this may less performant because example don't think can take advantage of database sorting ( @ least thru ef). why call tolist occurs before sorting results in memory on server.
hope makes sense.
Comments
Post a Comment