public static List <fnGetTablesRows_Result> GetTablesRowsCount() { using (var ctx = new RentooloEntities()) { var list = ctx.fnGetTablesRows().OrderByDescending(x => x.RowCount).ToList(); return(list); } }