Пример #1
0
 private void Save()
 {
     using (IContext context = CreateContext())
     {
         IEntityRepository entityRepository = CreateRepository(context);
         var presenter = new SetTextPresenter(entityRepository);
         _viewModel = presenter.Save(_viewModel);
     }
 }
Пример #2
0
        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);
        }