开发者

ASP.NET Membership - Search users

开发者 https://www.devze.com 2023-02-17 07:24 出处:网络
How does one perform a search (for example, by user name) on the membership data 开发者_高级运维stored by the default ASP.NET membership provider?var currentUser = Membership.GetUser(User.Identity.Nam

How does one perform a search (for example, by user name) on the membership data 开发者_高级运维stored by the default ASP.NET membership provider?


  var currentUser = Membership.GetUser(User.Identity.Name); 

after this you check if currentUser is null or not


I found out that I could import the membership schema into my own database and create the models using Entity Framework. This allows me to search by any fields and criterion I wish.

0

精彩评论

暂无评论...
验证码 换一张
取 消