How to convert this SQL to LINQ in C#? -


i have query in sql query below:

with pagedetail (     select           c.componentrefid, l.name, c.startdate,         row_number() over(partition c.componentrefid order c.startdate desc) rownumber               fm_componenttransaction c      inner join          fm_lk_statusinfo l on c.statusinforefid = l.refid     inner join          fm_scriptinfo s on s.refid = c.scriptrefid              s.customerinforefid = '85629125-7072-4efe-9201-97e088e126c6' ) select      pd.*       pagedetail pd       pd.rownumber = 1  

i can output of this. questions how implement query using entity framework?

i know not direct answer question, 1 approach create stored procedure in sql, , call stored procedure in entity framework.

code first: how call stored procedure in entity framework 6 (code-first)?

database first: https://msdn.microsoft.com/en-us/data/gg699321.aspx


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -