Esempio n. 1
0
 protected CqrsApi TestInstanz(Action<EventStore> hook = null)
 {
     var store = new InMemoryEventStore();
     var host = new CqrsHost(store);
     if (hook != null) hook(store);
     return new CqrsApi(host);
 }
Esempio n. 2
0
        static CqrsGmbH_Web()
        {
            // *************** Hier kann man zwischen Event Sourcing und SQL umstellen. Achtung: nur Event Sourcing ist voll implementiert.

            var store = new InMemoryEventStore();
            var port = new CqrsHost(store);

            // -oder -

            /*
            var ConnectionString = "";
            var port = new CqrsHost_SQL(() => new SqlConnection(ConnectionString));
            */

            _api = new Lazy<CqrsGmbH>( // <-- statt IoC
                () =>
                {
                    var api = new CqrsGmbH_CQRSAPI(port);
                    DemoDaten_erzeugen(api);
                    return api;
                });
        }
 protected CqrsGmbH Erzeuge_TestSystem(Action<EventStore> hook = null)
 {
     var store = new InMemoryEventStore();
     var host = new CqrsHost(store);
     if (hook != null) hook(store);
     return new CqrsGmbH_CQRSAPI(host);
 }