public override string[] GetAllRoles() { RolesFinder = ContainerInit._container.Resolve <IRolesFinder>(); List <RoleDto> listRoles = RolesFinder.FindRoles(); return(listRoles.Select(r => r.RoleName).ToArray()); }
public override string[] GetRolesForUser(string username) { RolesFinder = ContainerInit._container.Resolve <IRolesFinder>(); IList <RoleDto> listRoles = RolesFinder.FindUserRoles(username); if (listRoles == null) { return new string[] { } } ; return(listRoles.Select(lr => lr.RoleName).ToArray()); }