SubSonic IQueryable To String Array
Posted
by Daniel Draper
on Stack Overflow
See other posts from Stack Overflow
or by Daniel Draper
Published on 2010-06-03T15:32:40Z
Indexed on
2010/06/03
15:34 UTC
Read the original article
Hit count: 396
Hey All,
I have decided to use SubSonic (v3.0) for the first time and thoroughly enjoy it so far however I seem to have stumbled and I am hoping there is a nice neat solution.
I have a users, roles and joining table.
SubSonic (ActiveRecord) generated an entity User for my users table. A property of User is UserRoles and is of the type IQueryable this is my joining table.
I want to convert the IQueryable column name RoleName to a string array.
I have only just started playing with Linq as well and know of ToArray() but seem to be missing something or this isn't the function I want.
I could iterate over each item in the UserRoles property but seems a little excessive.
I appreciate your help! Cheers.
© Stack Overflow or respective owner