Database property get set for order by

How to write below code in c# as a database property with get and set for "Order BY"

Select ID, Name , Description from tMytable where Description = 'Test' Order BY ID

something line below
        [MyDBColumn]
        [MyDBMember]
        public string Description { get; set; }
Bharat GuruAsked:
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.

Karrtik IyerSoftware ArchitectCommented:
Not sure if I understand your question. Order by is a instruction to database (DBMS) to sort the records based on a particular field while returning records. In this the data returned by your query shall be sorted by field ID (default sort order is ascending I think).
Hence you would normally have properties for columns in your table.
Bharat GuruAuthor Commented:
I want to code as "order by "  as property how could I do it?
Karrtik IyerSoftware ArchitectCommented:
Do you mean you want to store order by clause as string and form the query dynamically? Please provide us information as to what you want to do with order by data. What is that you intend to achieve?

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
Bharat GuruAuthor Commented:
Thanks
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
Databases

From novice to tech pro — start learning today.