I am using Take() function with linq query. But I want to remove Take() function from linq query if I give Take(-1) in it. Because I don’t want make sql query with “Top” clause if index is -1.
Thanks in advance for suggestion.
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.
Thanks for suggestion but I got the answer. I made a extension method and checked the index there. This is the extension method which I used.