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 9211023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:12:15+00:00 2026-06-18T01:12:15+00:00

I have an EntityDataSource which is to select all the user entities which have

  • 0

I have an EntityDataSource which is to select all the user entities which have certain roles ordered by roleID. (I want to display the users gruoped by role, and therefore the order part is important).

the following code:

<asp:EntityDataSource ID="UserDataSource" runat="server" ConnectionString="name=MyEntities" 
    DefaultContainerName="MyEntities" EnableFlattening="False"
    EntitySetName="Users" Where="EXISTS(SELECT VALUE u FROM it.UserRoles AS u)" OrderBy="it.UserRoles.RoleId">
</asp:EntityDataSource>

produces the following error:

‘RoleId’ is not a member of ‘Transient.collection[MyModel.UserRole(Nullable=True,DefaultValue=)]’. To extract a property of a collection element, use a subquery to iterate over the collection.

Adding Include=”UserRoles” is of no help.


  • 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. Editorial Team
    Editorial Team
    2026-06-18T01:12:16+00:00Added an answer on June 18, 2026 at 1:12 am

    OK. I found the right syntax. here it is:

    OrderBy="ANYELEMENT(SELECT VALUE SqlServer.MIN(r.RoleId) From it.UserRoles AS r)"

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

Sidebar

Related Questions

I have an Entity Data Model with two entities in it Roles and Users.
I have GridView that allows select. It takes data from EntityDataSource . How do
I have a GridView with an EntityDataSource. I want to filter the rows at
I have an EntityDataSource bound to many filters used by gridview data, I want
I have an EntityDataSource I've mapped to the entity Resident which includes two navigation
I have an EntityDataSource: <asp:EntityDataSource ID=EntityDataSourcePersoneel runat=server ConnectionString=name=HotelTestDatabaseEntities DefaultContainerName=HotelTestDatabaseEntities EntitySetName=Personeels Include=Afdeling> </asp:EntityDataSource> I dynamically
On an ASP.NET web page I have an EntityDataSource: <asp:EntityDataSource ID=EntityDataSourceOrders runat=server ConnectionString=name=EntitiesContext DefaultContainerName=EntitiesContext
I have a FormView with paging enabled. The FormView is bound to an EntityDataSource
have written this little class, which generates a UUID every time an object of
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=

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.