Applied an order

This commit is contained in:
Thorsten Sommer 2022-07-17 16:00:32 +02:00
parent 0364c54427
commit ccc858830b
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -10,7 +10,7 @@ public static class TextElementProcessor
public static async Task<List<TextElement>> GetTextElements(Section section)
{
await using var db = ProcessorMeta.ServiceProvider.GetRequiredService<DataContext>();
return await db.TextElements.Where(n => n.Section == section).ToListAsync();
return await db.TextElements.Where(n => n.Section == section).OrderBy(n => n.Name).ThenBy(n => n.Id).ToListAsync();
}
public static async Task<ProcessorResult<TextElement>> AddTextElement(string? currentSectionKey, string elementName)