internal override void OnLoadingUserModel(Application app, CoreDbContext ctx)
        {
            if ((SubViews?.DetailViews?.Length ?? 0) > 0)
            {
                EditModal = Array.Find(SubViews.DetailViews, x => x.Id == EditModalId);
            }

            base.OnLoadingUserModel(app, ctx);
        }
        internal override void OnLoadingXml(Application app, CoreDbContext ctx)
        {
            base.OnLoadingXml(app, ctx);

            if (string.IsNullOrWhiteSpace(ControllerName) && !string.IsNullOrWhiteSpace(Entity.DefaultController))
            {
                ControllerName = Entity.DefaultController;
            }

            if (string.IsNullOrWhiteSpace(ActionName))
            {
                ActionName = app.ModuleConfiguration.ListViewDefaults.DefaultAction;
            }

            if (string.IsNullOrWhiteSpace(EditModalParameters))
            {
                EditModalParameters = app.ModuleConfiguration.ListViewDefaults.DefaultEditModalParameter;
            }

            if ((SubViews?.DetailViews?.Length ?? 0) > 0)
            {
                for (var d = 0; d < SubViews.DetailViews.Length; d++)
                {
                    SubViews.DetailViews[d].ParentViewId = ViewId;
                }

                if (string.IsNullOrWhiteSpace(EditModalId))
                {
                    EditModalId = Array.Find(SubViews.DetailViews, x => x.View.Type == Type)?.Id;
                }

                EditModal = Array.Find(SubViews.DetailViews, x => x.Id == EditModalId);
            }

            if ((SubViews?.LookupViews?.Length ?? 0) > 0)
            {
                for (var l = 0; l < SubViews.LookupViews.Length; l++)
                {
                    SubViews.LookupViews[l].ParentViewId = ViewId;
                }
            }

            if ((SubViews?.SubListViews?.Length ?? 0) > 0)
            {
                for (var s = 0; s < SubViews.SubListViews.Length; s++)
                {
                    SubViews.SubListViews[s].ParentViewId = ViewId;
                }
            }


            if (string.IsNullOrWhiteSpace(BoolCanEdit))
            {
                BoolCanEdit = app.ModuleConfiguration?.ListViewDefaults?.BoolCanEdit;
            }

            if (string.IsNullOrWhiteSpace(BoolShowPagination))
            {
                BoolShowPagination = app.ModuleConfiguration?.ListViewDefaults?.BoolShowPagination;
            }

            if ((Buttons?.Length ?? 0) > 0)
            {
                for (var b = 0; b < Buttons.Length; b++)
                {
                    OnLoadingSubButtons(Buttons[b]);
                }
            }

            if (PaginationOptions == null)
            {
                PaginationOptions = new PaginationOptions();
            }

            if (PaginationOptions.PageSize == null)
            {
                PaginationOptions.PageSize = app.ModuleConfiguration.ListViewDefaults.PageSize.Value;
            }

            if (PaginationOptions.PagesToShow == null)
            {
                PaginationOptions.PagesToShow = app.ModuleConfiguration.ListViewDefaults.PagesToShow.Value;
            }
        }