public static async Task <PropertySelectorViewModel> Create(Document doc, string dtoName, SolutionLocation dtoLocation, Document existingDto = null)
        {
            var autogeneratedProperties = await EntityParser.GetAutoGeneratedProperties(existingDto);

            var instance = new PropertySelectorViewModel();

            instance.EntityModel = await EntityViewModel.CreateRecursive(doc, depth : 3, existingProperties : autogeneratedProperties, canReuseBaseMapper : true);

            instance.EntityModel.DtoName = dtoName;
            instance.DtoLocation         = dtoLocation;

            var isDerived = await EntityParser.HasBaseDto(existingDto, instance.EntityModel.BaseEntityDtoName);

            instance.EntityModel.ReuseBaseEntityMapper |= isDerived;

            return(instance);
        }
        public static BasicOptionsViewModel Create(List <string> possibleProjects, string entityName, SolutionLocation likelyDtoLocation)
        {
            var instance = new BasicOptionsViewModel();

            instance.EntityName       = entityName;
            instance.PossibleProjects = possibleProjects;

            instance.DtoName     = entityName + "DTO";
            instance.DtoLocation = likelyDtoLocation ?? new SolutionLocation();

            instance.RecommendedNames = new List <string>();
            instance.RecommendedNames.Add(instance.DtoName);
            instance.RecommendedNames.Add(entityName + "ListDTO");
            instance.RecommendedNames.Add(entityName + "EditDTO");
            instance.RecommendedNames.Add(entityName + "SimpleDTO");
            instance.RecommendedNames.Add(entityName + "ExtendedDTO");

            return(instance);
        }