To one of my tables I added a sortOrder. I now need to update this query to respect the sortOrder authority!
Here is my current query:
var HTMLdocs = db.ProcedureDocs.Where(m => m.Procedures.Processes.processID == id && m.Document.html != null && m.Document.approvedBy != null).Select(m => m.Document); The table that has sortOrder is Procedures.
How can I get the above query to return results that are ordered by sortOrder.
Here is the table structure.
Processes can have 0 or many Procedures. Document can have 0 or many ProcedureDocs. ProcedureDocs has a foreign key to Procedures on procedureid. I somehow need to grab a collection of Document that somehow respects the order found in the Procedures table.
Let me know if you need any other information.