私は次のようなものを動作させようとしています:
_dbmsParentSections = FactoryTools.Factory.PdfSections
.Include(x => x.Children.OrderBy(y => y.Order).ToList())
.Include(x => x.Hint).Include(x => x.Fields)
.Where(x => x.FormId == FormId && x.Parent == null)
.OrderBy(o => o.Order)
.ToList();
例外の原因となる部分は次のとおりです。
.Include(x => x.Children.OrderBy(y => y.Order).ToList())
編集:
さらに観察すると、
_dbmsParentSections.ForEach(x => x.Children = x.Children.OrderBy(y => y.Order).ToList());
私のために仕事をしました(最初のFactory
呼び出しの後、 Children.OrderBy
.