1
(Learning ASP .NET MVC 3)。確定用戶登錄後有多少個ASP .NET MVC角色?
我該如何實現一個方法來確定驗證用戶所屬的ASP .NET角色的數量?
if (MembershipService.ValidateUser(model.UserName, model.Password))
{
FormsService.SignIn(model.UserName, model.RememberMe);
//???? start
if(howManyRoles(mode.UserName) > 1)
{
//get user to pick desire role
}
//???? end