示例#1
0
 public override string[] GetRolesForUser(string UserName)
 {
     using (var db = new QuanLyCFDbCotext())
     {
         var model = (from acc in db.accounts
                      join rol in db.Roles
                      on acc.RoleId equals rol.RoleId
                      where acc.UserName == UserName
                      select rol.RoleName).ToArray();
         return(model);
     }
 }