public DataResult <bool> AssignResourcePermissionsToUser(int id, IEnumerable <int> permissionIds) { try { m_userUoW.AssignResourcePermissionsToUser(id, permissionIds); return(Success(true)); } catch (NoResultException <RoleEntity> e) { m_logger.LogWarning(e); return(Error <bool>(m_translator.Translate("invalid-user-id"), DataResultErrorCode.UserNotExistId)); } catch (DatabaseException e) { m_logger.LogWarning(e); return(Error <bool>(e.Message)); } }