Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
desiredRecords = (from e in MdmsContext.ExtractSchedule
                                  join u in MdmsContext.ExtractDefinition on e.ExtractID 
                                  equals u.Id
                                  where u.TenantId == Context.TenantId
                                  select new
                                  {
                                      e.Id,
                                      e.ExtractName,                                 
                                      e.NextRunTime
                                  }).OrderByDescending(x => x.Id)


What I have tried:

Please convert this into sql form.
does it mean -
Select Id,ExtractName,NextRunTime from ExtractSchedule e join ExtractDefinition u on e.ExtractID=u.Id order by u.id desc;
Posted
Updated 18-Dec-22 18:13pm
v2
Comments
OriginalGriff 30-Aug-21 6:36am    
What have you tried?
Where are you stuck?
What help do you need?

Use the "Improve question" widget to edit your question and provide better information.
Himansh jain 30-Aug-21 7:26am    
Select Id,ExtractName,NextRunTime from ExtractSchedule e join ExtractDefinition u on e.ExtractID=u.Id order by u.id desc;

Is this correct?

1 solution

Try this:

SQL
SELECT e.Id, e.ExtractName, e.NextRunTime
FROM ExtractSchedule AS e 
    INNER JOIN ExtractDefinition AS u ON e.ExtractID = u.Id AND u.TenantId == @TenantId
ORDER BY e.Id DESC
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900