Skip to content

Get data from database

Asp.Net Hein

Asp.Net Hein

Asked May 11, 2015, 10:23 PM EDT3 answers
Share
LinkedInX
How to get data from unique column in database with entity framework?
 
For eg. Table in database with 3 colums. (ID, Name , Password).
   I want to get all the data in Name column only.
 
Can anyone help me in my question.
 
Thanks a lot :-) 

3 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Asp.Net Hein
    0
    It is getting all.I want to get only one column!!!!!!!!!!!!!!!!!!!!!!!
    0
  • Pranay Rana
    0
    yes it getting all column in 1 column
    0
  • Pranay Rana
    -1
    you can do like this


    var listofstring = (from rec in context.table
                            select rec.id.ToString() + rec.Name + rec.Password).ToList();
    -1