public override string[] GetAllRoles() { using (BlogUnitOfWork context = new BlogUnitOfWork(new ModelContextInit())) { return context.Roles.Select(Rl => Rl.RoleName).ToArray(); } }
public static string[] GetAllRoles() { CodeFirstRoleProvider rp = new CodeFirstRoleProvider(); return rp.GetAllRoles(); }