Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 165795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:59:03+00:00 2026-05-11T11:59:03+00:00

I got a problem that is just killing me. One of my CSLA object

  • 0

I got a problem that is just killing me. One of my CSLA object (let’s say Parent) has many children (let’s call them Children – a list of Child). Parent is a Editable Root (BusinessBase) and Children is an Editable Child List (BusinessListBase) and Child is Editable Child.

What I am trying to do is to do this: Parent x = Parent.GetParent(id); IQueryable y = Parent.MyChildren.OrderBy(‘Age DESC’);

In theory, y then should be filled with a collection of children sorted descendingly by their age (assuming ‘Age’ is a property of Child object).

But, what I got is that y.Count() = 0. Although if I do a Parent.MyChildren.Count() there aren’t 0. Is this a bug in Dynamic LINQ or CSLA? This (the error) does not happen in readonly list for me.

Help! Joe

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T11:59:04+00:00Added an answer on May 11, 2026 at 11:59 am

    Joe,

    Here’s a clue that might help. Your comment about the difference between an editable list and a readonly list got me curious, so I dug a little deeper.

    Based on what I could tell from digging into the CSLA 3.5 code, BusinessListBase implements IQueryable (actually it’s ‘C’ in the CSLA code, as in ‘Child’). The ReadOnlyListBase class does not.

    This may affect which Dynamic LINQ OrderBy extension method is being called (there are two), and the one for IQueryable simply calls the version of OrderBy for the regular IQueryable.

    On the other hand, if you follow the trail of IQueryable in BusinessListBase, the Provider property (of type IQueryProvider) delegates to the CslaQueryProvider.

    public IQueryProvider Provider {   get {     return new Linq.CslaQueryProvider<T, C>(this);   } } 

    All of that to say, with the limited time I had to spend, I think delving further (with a debugger, duh!) into the CSLA LINQ stuff is probably warranted. From other discussion and follow-up elsewhere, I saw you also pointed to a bug/issue recorded for CSLA. Here’s the link:

    CSLA Issue ID 326 – OrderBy should return a LinqBindingList that works with Bound Grids

    My suspicion is that it has more to do with BusinessListBase’s implementation of IQueryable than anything else. And again, it doesn’t look like ReadOnlyListBase implement IQueryable, either directly or via inheritance (in my copy of CSLA 3.5).

    Hope that helps.

    Jeff Miller

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got this problem that I can't just solve algorithmically. Let's say i have
I am running into a problem that just doesn't seem right. I've got a
I've got abit of a strange problem, that I just can't seem to solve!
Tomcat has got that well-known memory leak problem that causes PermGen space errors after
I've got a problem with ODBC that has me stumped, and I can't find
I'm totally a newbie with PHP. Today I just got a problem that I
I've got a problem here that's probably something that I'm just overlooking, but I
I've got a problem with my universal app that I just recently ported to
I got the problem that the if-statement doesn't work. After the first code line
I've got the problem that the UIAlertViewDelegate method - (void)alertViewCancel:(UIAlertView *)alertView is not called

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.