Avatar of chpk
 asked on

Using Distinct in Entity frame work need urgent help

  I am using entity frame work to get the things from database.
 Actually i want to use distinct to get data from the view so i am coding like the following but i am getting an error can you please help me.

   var test = (from t in details()
                     where t.id = id
                      select t.name,t.date,t.number).distinct();

but the above code is not working and it is giving me error at the place of t.name,t.date,t.number.
i mean it is not showing even to select t.date and next one.

Can you please help me in this situation.
Thanks in advance.
If you have any questions let me know .I will explain the question clearly.
.NET ProgrammingMicrosoft Development

Avatar of undefined
Last Comment
Fernando Soto

8/22/2022 - Mon
Fernando Soto

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Hi Fernando,

  I tried it and it's working fine.I am not getting any build errors but unfortunately i did not have data to check the output.
 But i think this will work.
 When i get the data i will check and if anything wrong i will ask you again.

Thank you so much.

Fernando Soto

Not a problem, always glad to help.  ;=)
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck