public DisplayMenu(ModelScaffolderViewModel viewModel)
        {
            InitializeComponent();

            ViewModel = viewModel;
            DataContext = ViewModel;
        }
        public void ShowUIAndGenerateCode()
        {
            ModelScaffolderViewModel viewModel = new ModelScaffolderViewModel(Services);
            DisplayMenu window = new DisplayMenu(viewModel);
            bool? isOk = window.ShowDialog();

            if (isOk.Value)
            {
                Cursor currentCursor = Mouse.OverrideCursor;
                try
                {
                    Mouse.OverrideCursor = Cursors.Wait;

                    if (String.IsNullOrEmpty(viewModel.ModelName))
                    {
                        throw new ArgumentNullException("model name cannot be null");
                    }

                    GenerateCode(viewModel.ModelName,
                    viewModel.BaseClassType,
                        viewModel.PropertiesCollection);
                }
                finally
                {
                    Mouse.OverrideCursor = currentCursor;
                }
            }
        }