Last post Jul 28, 2016 05:40 AM by Yohann Lu
Jul 27, 2016 12:07 PM|Khan_1|LINK
var query1 = Uow.Repository<WorkFlow>()
.Query(x => x.StatusIdFrom == statusid)
.OrderBy(q => q.OrderBy(x => x.StatusList.DisplayOrder))
Jul 27, 2016 07:18 PM|Glenn Saint|LINK
Hi there, it would something like:
from WorkFlow w
join StatusList sl on sl.SomethingID = w.SomethingID
w.StatusID = statusId
order by sl.DisplayOrder
Just change the SomethingID as the field that would link between the WorkFlow and StatusList.
Can you send your POCO declaration of WorkFlow & StatusList so that we can give you the correct transalation?
Jul 28, 2016 05:40 AM|Yohann Lu|LINK
You can try the following methods.
1: DataContext.GetCommand Method (IQueryable)
It will Gets the information about SQL commands generated by LINQ to SQL.
2: You can use LINQPad.It's Free
LINQPad also supports all the LINQ APIs in the .NET Framework, including LINQ to XML, PLINQ, LINQ to SQL and Entity Framework
3: You can use SQL Server Profiler inside the Sql Server (Tools --> SQL Server Profiler)
4: You can use Visual Studio Debugger for Generate T-Sql.(with any visual studio version)
You can refer the following link.
How to Convert Linq Entity Query into T-SQL: