private void StartScaffoldingAsync(Object sender, EventArgs e) { var logger = new RichTextBoxLogger(log, sender as BackgroundWorker); var templateVars = new TemplateVars(TableName, TableColumns, ProjectItem.Name); var templateProvider = GetTemplateProvider(); var codeCommentator = new CodeCommentator(); var vsProjectPersister = new VsProjectFilePersister(ProjectItem, codeCommentator, logger); TableDesignerVisible = false; ScaffoldingLogVisible = true; var scaffolder = new TableScaffolder( templateVars, templateProvider, vsProjectPersister, ProjectItem, logger); scaffolder.Scaffold(); }