Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have query like to display record to grid view for this purpose i have this sql query like

SQL
SELECT  tbl_Post_History.Title, CAST (tbl_User_master.First_name+' '+tbl_User_master.Last_name AS VARCHAR(50)) AS [Publisher], tbl_Post_History.Created_datetime, tbl_History_Files.File_name,
        tbl_History_Files.File_ext, tbl_History_Files.File_Size, tbl_Post_History.Category_id
FROM    tbl_History_Files INNER JOIN
        tbl_Post_History ON tbl_History_Files.Post_History_id = tbl_Post_History.Id INNER JOIN
        tbl_User_master ON tbl_Post_History.User_id = tbl_User_master.Id AND tbl_Post_History.ToUser_id = tbl_User_master.Id
WHERE(tbl_Post_History.User_id = '1' OR tbl_Post_History.ToUser_id = '1')


how i write this query in linq using this cast function that i include this query.

please help me..
Posted

1 solution

Use tools like LINQPad[^]
 
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