brockallen / BrockAllen.MembershipReboot

MembershipReboot is a user identity management and authentication library.
Other
743 stars 239 forks source link

Way to get properties for custom UserAccount in query methods #684

Closed duribe-vibrent closed 7 years ago

duribe-vibrent commented 7 years ago

I'm not sure whether this limitation was part of the design or not, but even though it seems that it is possible to use a custom subclass of UserAccount in the filter function to the QueryableUserAccountRepository.Query() method, I can't find a way to include any of the extra properties from the UserAccount subclass (e.g. FirstName, LastName) since the returned type is just an enumerable set of UserAccountQueryResult objects.

I'm thinking of an improvement to allow this, but I would like to run the idea by you first. What about using generics in the UserAccountQueryResult class to allow the inclusion of the UserAccount object as another property? Then QueryableUserAccountRepository could set that property along with the other ones it currently sets.

We can always get the actual object by calling the GetByID method for each result, but of course that is not going to be as efficient.

brockallen commented 7 years ago

Given that I don't foresee making this change, I'll close this issue. Thanks.