Order by in LINQ vb.net MVC

I have this in my People model to get a list of people:

Partial Class PeopleDataContext
    Public Function GetPeople() As List(Of People_t)
        Return People_ts.ToList
    End Function

How can I make this orderby People_t.Last

Hopefully this is an easy one.  

Thanks!!!
LVL 1
ttist25Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nepaluzCommented:
you have to order by a member of the structure in People_t
i.e if People_t is
    Structure People_t
        Public FirstName As String
        Public LastName As String
    End Structure

Open in new window

You can then use your function to return an ordered list (be it the lastone only in this case). Ideally, you would have to pass the list for ordering to the function.
    Public Function GetPeople(ByVal People_ts As New List(Of People_t)) As List(Of People_t)
        Dim query As IEnumerable(Of People_t) = People_ts.OrderBy(Function(x) x.FirstName)
        Return New List(Of People_t) From {query.LastOrDefault}

    End Function

Open in new window

0
ttist25Author Commented:
Sorry for the delay in getting back.  Haven't been feeling well.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.