diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs index da5af4862..d4927be05 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs @@ -450,7 +450,7 @@ namespace IRaCIS.Core.Application.Contracts } - public class SiteSurveyLogQuery + public class SiteSurveyLogQuery:SortInput { [NotDefault] public Guid TrialSiteSurveyId { get; set; } diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index ca8c375f3..ec40fce45 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -1458,7 +1458,7 @@ namespace IRaCIS.Core.Application.Contracts { return _siteSurveyLogRepository.Where(t => t.TrialSiteSurveyId == inQuery.TrialSiteSurveyId) .WhereIf(inQuery.Id != null, t => t.Id == inQuery.Id) - .ProjectTo(_mapper.ConfigurationProvider).ToList(); + .ProjectTo(_mapper.ConfigurationProvider).OrderBy(t=>t.CreateTime).ToList(); } ///