private SaveTextPresenter CreatePresenter(IContext context) { var entityRepository = PersistenceHelper.CreateRepository <IEntityRepository>(context); var presenter = new SaveTextPresenter(entityRepository); return(presenter); }
public override string Load(Dictionary <string, string> parameters) { using (IContext context = PersistenceHelper.CreateContext()) { IEntityRepository entityRepository = PersistenceHelper.CreateRepository <IEntityRepository>(context); SetTextPresenter presenter = new SetTextPresenter(entityRepository); Model = presenter.Show(); } return(ViewPerspective.Default); }
public SaveTextViewModel Save(SaveTextViewModel viewModel, string cultureName) { ServiceHelper.SetCulture(cultureName); using (IContext context = PersistenceHelper.CreateContext()) { var entityRepository = PersistenceHelper.CreateRepository <IEntityRepository>(context); var presenter = new SaveTextPresenter(entityRepository); SaveTextViewModel viewModel2 = presenter.Save(viewModel); return(viewModel2); } }