How to achieve Oraclel’s CONNECT BY PRIOR output using LINQ? Basically i need the hierarchy and level using LINQ?
How to achieve Oraclel’s CONNECT BY PRIOR output using LINQ? Basically i need the
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There isn’t one. LINQ does not have special support for recursive queries.
An approach you can use is to write a method that fetches the top level using a LINQ query, then a method that calls itself recursively to get the children for each of the items received so far. This can result in a lot of small LINQ queries which might not be desiarable.
A different approach is to use a stored procedure containing a recursive query and call that using LINQ.