/// <summary>
        /// Retrieve ViewModels from a layout action.
        /// </summary>
        /// <param name="action">An ActionInfo object.</param>
        /// <returns>A list of EntityInfo.</returns>
        public static List <EntityInfo> GetActionViewModelsEntities(
            this ActionInfo action,
            ApiList apis)
        {
            var viewModels = new List <EntityInfo>();

            if (!action.IsValid() ||
                !apis.IsValid())
            {
                return(viewModels);
            }

            var apiAction      = action.GetAction();
            var entityComparer = new EntityInfoComparer();

            if (apiAction.IsValid())
            {
                viewModels = viewModels
                             .Union(
                    apis.GetApiListViewModelsEntities(apiAction),
                    entityComparer)
                             .ToList();
            }

            return(viewModels);
        }
        /// <summary>
        /// Retrieve ViewModels from a layout action.
        /// </summary>
        /// <param name="action">An ActionInfo object.</param>
        /// <param name="apis">An ApiList object.</param>
        /// <returns>A list of ViewModels id.</returns>
        public static List <string> GetActionViewModelsId(
            this ActionInfo action,
            ApiList apis)
        {
            var viewModels = new List <string>();

            if (!action.IsValid() ||
                !apis.IsValid())
            {
                return(viewModels);
            }

            var apiAction = action.GetAction();

            if (apiAction.IsValid())
            {
                viewModels = viewModels
                             .Union(apis.GetApiListViewModelsId(apiAction))
                             .ToList();
            }

            return(viewModels);
        }