瀏覽代碼

修改查询顺序

wang bao chen 4 月之前
父節點
當前提交
6aca21c805
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      DutyApp/ViewModels/DailyDutyRecordViewModel.cs

+ 1 - 1
DutyApp/ViewModels/DailyDutyRecordViewModel.cs

@@ -150,7 +150,7 @@ namespace DutyApp.ViewModels
             var dailyDuty = await _dutyContext.DailyDutyRecords.
                 Include(x => x.Picture)
                 .Where(x => x.DutyDate == maxDay)
-                .OrderBy(x => x.RecordId)
+                .OrderBy(x => x.Index)
                 .ToListAsync();
 
             if (dailyDuty.Count == 0)