public MvcViewScaffolderModel(CodeGenerationContext context) : base(context)
        {
            string str = null;

            this.IsLayoutPageSelected  = true;
            this.IsPartialViewSelected = false;
            this.IsReferenceScriptLibrariesSelected = true;
            base.AreaName      = MvcViewScaffolderModel.GetAreaNameFromSelection(context.ActiveProjectItem);
            this.ViewTemplates = Enumerable.Empty <ViewTemplate>();
            IEnumerable <CodeType> allCodeTypes = base.ServiceProvider.GetService <ICodeTypeService>().GetAllCodeTypes(base.ActiveProject);
            List <ModelType>       modelTypes   = new List <ModelType>();
            List <ModelType>       modelTypes1  = new List <ModelType>();

            foreach (CodeType allCodeType in allCodeTypes)
            {
                if (!Microsoft.AspNet.Scaffolding.EntityFramework.CodeTypeExtensions.IsValidDbContextType(allCodeType))
                {
                    if (!Microsoft.AspNet.Scaffolding.EntityFramework.CodeTypeExtensions.IsValidWebProjectEntityType(allCodeType))
                    {
                        continue;
                    }
                    modelTypes.Add(new ModelType(allCodeType));
                }
                else
                {
                    modelTypes1.Add(new ModelType(allCodeType));
                }
            }
            this.ModelTypes            = modelTypes;
            this.DataContextTypes      = modelTypes1;
            this.IsModelClassSupported = true;
            if (!context.Items.TryGetProperty <string>("DefaultViewName", out str))
            {
                this.ViewName = this.GetGeneratedName(MvcProjectUtil.ViewName, this.ViewFileExtension);
            }
            else
            {
                this.ViewName = str;
            }
            if (context.Items.TryGetProperty <string>("ControllerFolderName", out str) && str != null)
            {
                base.SelectionRelativePath = Path.Combine(base.AreaRelativePath, "Views", str);
            }
        }