Overriding SQLMembershipProvider in C#
Posted
by vikp
on Stack Overflow
See other posts from Stack Overflow
or by vikp
Published on 2010-05-27T09:14:48Z
Indexed on
2010/05/27
9:51 UTC
Read the original article
Hit count: 468
Hi,
Is there built in methods into .net framework to do the following:
- Get role GUID from user name/user GUID
- Get role name from role GUID
So far I have been sending queries to the asp_roles and asp_users tables to obtain that information and I'm wondering if there is a nicer way of doing this?
I have the following methods that I store in the ASPUtilities class:
getRoleGUID(guid userGuid) { LINQ joins }
getRoleGuid(string userName) { LINQ joins }
getRoleName(guid roleGuid) { LINQ joins }
Thank you
EDIT:
I have just looked into extending SQLMembershipProvider examples.
Few examples completely override the SQLMembershipProvider, but I think what I'm interested is just adding few extra methods to deal with the roles by using LINQ. Is this feasible?
© Stack Overflow or respective owner