public NewDataView(IReadOnlyViewState viewState, NewDataController controller) { InitializeComponent(); this.controller = controller; this.viewState = viewState; }
private void Application_Startup(object sender, StartupEventArgs e) { using (var model = CreateDbContext()) { model.Database.Migrate(); } var viewState = ViewState.RetrieveDataFrom(CreateDbContext()); var projectC = new ProjectController(viewState, CreateDbContext); var importC = new ImportController(viewState, CreateDbContext); var databaseC = new DataBaseController(viewState, CreateDbContext); var factorsC = new FactorsController(viewState, CreateDbContext); var newdataC = new NewDataController(viewState, CreateDbContext); var view = new MainWindow(viewState, importC, projectC, databaseC, factorsC, newdataC); view.ShowDialog(); }
public MainWindow( IReadOnlyViewState model, ImportController importC, ProjectController projectC, DataBaseController databaseC, FactorsController factorsC, NewDataController newdataC) { InitializeComponent(); this.model = model; this.importC = importC; this.projectC = projectC; this.databaseC = databaseC; this.factorsC = factorsC; this.newdataC = newdataC; }