I am using entity framework to develop asp.net website(C#)
with SQL database I have column[FromMonth] saving string data Type (not int), how to add order by with that sort order
{ Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec } descending
please help
List< TblExperince > experince =(from x in db.TblExperince
where x.id_main == IDmain
orderby x.FromYear descending[,x.FromMonth ??]
select x).ToList();
I found the solution by adding new table to my .edmx model for ordering months and its work
List<TblExperince> experince = (from x in db.TblExperince
join o in db.TblMonthOrder on x.FromMonth equals o.MonthName
where x.id_main == IDmain
orderby x.FromYear descending,o.MonthNo descending
select x).ToList();