Link to home
Start Free TrialLog in
Avatar of Bharat Guru
Bharat Guru

asked on

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; }
Avatar of Karrtik Iyer
Karrtik Iyer
Flag of India image

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.
Avatar of Bharat Guru
Bharat Guru

ASKER

I want to code as "order by "  as property how could I do it?
ASKER CERTIFIED SOLUTION
Avatar of Karrtik Iyer
Karrtik Iyer
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks