BgEngine.Infraestructure.Security.CodeFirstRoleProvider.GetAllRoles C# (CSharp) Метод

GetAllRoles() публичный Метод

public GetAllRoles ( ) : string[]
Результат string[]
        public override string[] GetAllRoles()
        {
            using (BlogUnitOfWork context = new BlogUnitOfWork(new ModelContextInit()))
                    {
                        return context.Roles.Select(Rl => Rl.RoleName).ToArray();
                    }
        }

Usage Example

Пример #1
0
 public static string[] GetAllRoles()
 {
     CodeFirstRoleProvider rp = new CodeFirstRoleProvider();
     return rp.GetAllRoles();
 }