Ejemplo n.º 1
0
        public ZCMSBaseController(UnitOfWork work, List<ZCMSMenu> menu)
        {
            _worker = work;
            _menu = menu;

            ViewData["MenuData"] = _menu;
        }
Ejemplo n.º 2
0
        public TestController1()
        {
            // Init ravendb embedded mode...
            var documentStore = new DocumentStore
            {

                Conventions =
                {
                    FindTypeTagName = type => typeof(IZCMSPageType).IsAssignableFrom(type) ? "IZCMSPageType" : null,
                }
            };
            documentStore.Initialize();

            worker = new UnitOfWork(documentStore);
        }
Ejemplo n.º 3
0
 public ZCMSBaseAjaxController(UnitOfWork work)
 {
     _worker = work;
 }
Ejemplo n.º 4
0
 public BackendController(UnitOfWork worker, List<ZCMSMenu> menu)
     : base(worker, menu)
 {
 }
Ejemplo n.º 5
0
 public AjaxBackendController(UnitOfWork worker)
     : base(worker)
 {
 }
Ejemplo n.º 6
0
        private UnitOfWork GetUnitOfWork()
        {
            var documentStore = new DocumentStore
            {
                Url = "http://localhost:8088",
                DefaultDatabase = ConfigurationManager.AppSettings["RavenDBDefaultDb"].ToString(),
                Conventions =
                {
                    FindTypeTagName = type => typeof(IZCMSPageType).IsAssignableFrom(type) ? "IZCMSPageType" : null,
                },
                Credentials = new System.Net.NetworkCredential(ConfigurationManager.AppSettings["RavenDBWindowsUser"].ToString(), ConfigurationManager.AppSettings["RavenDBWindowsPassword"].ToString()),
            };

            documentStore.Initialize();
            documentStore.JsonRequestFactory.EnableBasicAuthenticationOverUnsecureHttpEvenThoughPasswordsWouldBeSentOverTheWireInClearTextToBeStolenByHackers = true;
            documentStore.DatabaseCommands.EnsureDatabaseExists(ConfigurationManager.AppSettings["RavenDBDefaultDb"].ToString(), true);

            UnitOfWork worker = new UnitOfWork(documentStore);
            return worker;
        }
Ejemplo n.º 7
0
 public AjaxFrontendController(UnitOfWork worker)
     : base(worker)
 {
 }
Ejemplo n.º 8
0
 public AuthenticationController(UnitOfWork work)
 {
     _worker = work;
 }
Ejemplo n.º 9
0
 public FileController(UnitOfWork worker)
     : base(worker)
 {
 }
Ejemplo n.º 10
0
 public FrontendController(UnitOfWork work)
     : base(work)
 {
 }