Click here to Skip to main content
13,662,176 members
Rate this:
 
Please Sign up or sign in to vote.
See more:
SELECT [t1].[TimelineEndDate], [t0].[DateRecieved], [t2].[ConceptName],[t4].MaxTimeLimit
FROM [QualityAssuranceTesting] AS [t0]
LEFT JOIN [ImplementationTimeline] AS [t1] ON [t0].[RequestId] = [t1].[RequestId]
LEFT JOIN [PIP_Concept] AS [t2] ON [t0].[RequestId] = [t2].[RequestId]
LEFT JOIN [ActionHistoryInfo] AS [t3] ON [t2].[RequestId] = [t3].[RequestId]
LEFT JOIN [SlaCategory] AS [t4] ON [t4].SlaLevel = 'Implementation'
Left JOIN [ActionHistoryInfo] AS [t5] ON [t5].ActionTimeStamp BETWEEN '2017-11-06' AND '2017-09-06'


What I have tried:

from q in QualityAssuranceTestings 
join i in ImplementationTimelines
.where(imple=>imple.RequestId == p.RequestId).DefaultIfEmpty()
join c in PIP_Concepts
.where(concept=>concept.RequestId == i.RequestId).DefaultIfEmpty()
join a in ActionHistoryInfo
.where(action=>action.RequestId == i.RequestId).DefaultIfEmpty()
join s in SlaCategories.where(x=>x.Slalevel == "Implementation") into 
where a.ActionTimeStamp <=new DateTime(2017,09,06) && a.ActionTimeStamp>= new DateTime(2017,11,06)
select new
{
i.TimelineEndDate,
q.DateRecieved,
c.ConceptName,
}
Posted 9-Nov-17 7:26am
Updated 14-Nov-17 12:30pm
v2

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Not a real answer but... there is a tool called Linqer[^] which can convert from SQL to Linq - you can get a trial which will get you out of your immediate problem.

I have found Linq to be very frustrating at times, some SQL functions such as DateDiff are just not supported or extremely problematic to implement. When I run into these issues in MVC is revert to straight SQL - refer Entity Framework Raw SQL Queries[^]

Kind Regards
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web04-2016 | 2.8.180810.1 | Last Updated 14 Nov 2017
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100