I am new in asp.net memebership. I am facing a problem. There is a table in db named profile in which a column named PropertyValueStrings have a value. I want to get user from Memberships table by using PropertyValueStrings. Like
select * from Memberships where UserId = (select UserId from Profiles where PropertyValueStrings=12 )
Is it possible in c#?
Sure it is possible. However, it is not recommended. The membership classes provide an excellent interface to list all the users, also you can fetch their roles and membership to each role using the membership APIs.
The reason why microsoft is providing this functionality is, you don’t have to write the sql and deal with tables.
The role base security and profile service extensively use SQL and they are normal tables. You can query them exactly in the same way as you do on other tables.