Example #1
0
        public OutputStockRepo(IFactoryConnection efc)
        {
            IFactoryRepository <OutputStock> efr = new DbContext <OutputStock>();

            _conn  = efc;
            _efcmd = efr.FactoryCommand(efc);
        }
Example #2
0
 public IntegrationCapeStockApp(IFactoryConnection efc)
 {
     _epr            = new IntegrationCapeStockRepo(efc);
     _inputStockApp  = new InputStockApp(efc);
     _outputStockApp = new OutputStockApp(efc);
     _stockMapper    = new StockMapper();
     _conn           = efc;
 }
Example #3
0
 public ItemOutputStockApp(IFactoryConnection efc)
 {
     _epr                      = new ItemOutputStockRepo(efc);
     _stockManagement          = new StockManagement(efc);
     _stockItemApp             = new StockItemApp(efc);
     _unitMeasureConversionApp = new UnitMeasureConversionApp(efc);
     Logs                      = new List <Log>();
 }
Example #4
0
 public UnitMeasureConversionApp(IFactoryConnection efc)
 {
     _epr            = new UnitMeasureConversionRepo(efc);
     _unitMeasureApp = new UnitMeasureApp(efc);
     _stockItemApp   = new StockItemApp(efc);
     _familyApp      = new FamilyApp(efc);
     Logs            = new List <Log>();
 }
Example #5
0
 public OsProductApp(IFactoryConnection efc)
 {
     _epr   = new OsProductRepo(efc);
     _osApp = new OrderOfServiceApp(efc);
     _integrationCapeStockApp  = new IntegrationCapeStockApp(efc);
     _integrationItemsStockApp = new IntegrationItemsStockApp(efc);
     _conn = efc;
 }
 public IntegrationItemsStockApp(IFactoryConnection efc)
 {
     _epr = new IntegrationItemsStockRepo(efc);
     _itemInputStockApp  = new ItemInputStockApp(efc);
     _itemOutputStockApp = new ItemOutputStockApp(efc);
     _stockMapper        = new StockMapper();
     _conn = efc;
 }
Example #7
0
        public IActionResult Add(Interfaces.Presentacion.Entities.Factory factory)
        {
            FactoryCommands factoryCommands = new FactoryCommands();
            IFactoryCommand factoryCommand  = factoryCommands.CreateFactoryCommand(this.DatabaseEngine);

            factoryCommand.CreateFactory(factory);

            return(RedirectToAction("Index", "Factory"));
        }
        // this Update method abstracts away the name of the exact aggregate method that we will be using/calling
        // this approach allows us to use this single Update method for multiple command messages
        // this method is where we implement the lifetime management of an Aggregate in one place

        void Update(IFactoryCommand forAggregateIdentifiedBy, Action<FactoryAggregate> executeCommandUsingThis)
        {
            // Load the event stream from the event store using the FactoryId of the passed in command
            var key = forAggregateIdentifiedBy.Id.ToString();
            var eventStream = _eventStore.LoadEventStream(key);

            // create a new Factory aggregate instance from its history of allEventsRelatedToThisAggregateId
            var aggregateState = new FactoryState(eventStream.Events);
            var aggregate = new FactoryAggregate(aggregateState);

            // execute the delegated Action (lambda that contains a reference to a specific aggregate method call)
            // that was passed to this Update method by the "When" methods below
            executeCommandUsingThis(aggregate);

            // append resulting changes to the aggregate's event stream
            _eventStore.AppendEventsToStream(key, eventStream.StreamVersion, aggregate.EventsThatHappened);
        }
Example #9
0
        // this Update method abstracts away the name of the exact aggregate method that we will be using/calling
        // this approach allows us to use this single Update method for multiple command messages
        // this method is where we implement the lifetime management of an Aggregate in one place

        void Update(IFactoryCommand forAggregateIdentifiedBy, Action <FactoryAggregate> executeCommandUsingThis)
        {
            // Load the event stream from the event store using the FactoryId of the passed in command
            var key         = forAggregateIdentifiedBy.Id.ToString();
            var eventStream = _eventStore.LoadEventStream(key);

            // create a new Factory aggregate instance from its history of allEventsRelatedToThisAggregateId
            var aggregateState = new FactoryState(eventStream.Events);
            var aggregate      = new FactoryAggregate(aggregateState);

            // execute the delegated Action (lambda that contains a reference to a specific aggregate method call)
            // that was passed to this Update method by the "When" methods below
            executeCommandUsingThis(aggregate);

            // append resulting changes to the aggregate's event stream
            _eventStore.AppendEventsToStream(key, eventStream.StreamVersion, aggregate.EventsThatHappened);
        }
Example #10
0
 public FilterCompanyApp(IFactoryConnection efc)
 {
     _epr = new FilterCompanyRepo(efc);
 }
Example #11
0
 public VehicleApp(IFactoryConnection efc)
 {
     _epr = new VehicleRepo(efc);
 }
Example #12
0
 public TranslateApp(IFactoryConnection efc)
 {
     _epr = new TranslateRepo(efc);
 }
Example #13
0
 public OsServiceApp(IFactoryConnection efc)
 {
     _epr = new OsServiceRepo(efc);
 }
Example #14
0
        public CboRepo(IFactoryConnection efc)
        {
            IFactoryRepository <Cbo> efr = new DbContext <Cbo>();

            _efcmd = efr.FactoryCommand(efc);
        }
        public InstallmentOfAccountsReceivableRepo(IFactoryConnection efc)
        {
            IFactoryRepository <InstallmentOfAccountsReceivable> efr = new OdbcSqlServer <InstallmentOfAccountsReceivable>();

            _efcmd = efr.FactoryCommand(efc);
        }
Example #16
0
        public ReligionRepo(IFactoryConnection efc)
        {
            IFactoryRepository <Religion> efr = new DbContext <Religion>();

            _efcmd = efr.FactoryCommand(efc);
        }
Example #17
0
 public TypeDocumentFinancialApp(IFactoryConnection efc)
 {
     _epr = new TypeDocumentFinancialRepo(efc);
 }
Example #18
0
        public DbTableRepo(IFactoryConnection efc)
        {
            IFactoryRepository <DbTable> efr = new DbContext <DbTable>();

            _efcmd = efr.FactoryCommand(efc);
        }
Example #19
0
 public OsStockApp()
 {
     _epr = new OsStockRepo();
 }
Example #20
0
        public VehicleModelVehicleRepo(IFactoryConnection efc)
        {
            IFactoryRepository <VehicleModelVehicle> efr = new OdbcSqlServer <VehicleModelVehicle>();

            _efcmd = efr.FactoryCommand(efc);
        }
Example #21
0
 public TaxationApp(IFactoryConnection efc)
 {
     _epr = new TaxationRepo(efc);
 }
Example #22
0
        public StateRepo(IFactoryConnection efc)
        {
            IFactoryRepository <State> efr = new DbContext <State>();

            _efcmd = efr.FactoryCommand(efc);
        }
Example #23
0
        public LegalPersonRepo(IFactoryConnection efc)
        {
            IFactoryRepository <LegalPerson> efr = new DbContext <LegalPerson>();

            _efcmd = efr.FactoryCommand(efc);
        }
Example #24
0
        public OsProductRepo(IFactoryConnection efc)
        {
            IFactoryRepository <OsProduct> efr = new DbContext <OsProduct>();

            _efcmd = efr.FactoryCommand(efc);
        }
Example #25
0
 public ChargeLevelApp(IFactoryConnection efc)
 {
     _epr = new ChargeLevelRepo(efc);
 }
Example #26
0
 public GroupPermissionApp(IFactoryConnection efc)
 {
     _epr = new GroupPermissionRepo(efc);
 }
Example #27
0
        public ItemInputStockRepo(IFactoryConnection efc)
        {
            IFactoryRepository <ItemInputStock> efr = new DbContext <ItemInputStock>();

            _efcmd = efr.FactoryCommand(efc);
        }
Example #28
0
 public SpecialTaxApp(IFactoryConnection efc)
 {
     _epr = new SpecialTaxRepo(efc);
 }
Example #29
0
 public UnitMeasureApp(IFactoryConnection efc)
 {
     _epr = new UnitMeasureRepo(efc);
 }
Example #30
0
 protected void When(IFactoryCommand when)
 {
     WhenMessage(when);
 }
Example #31
0
        public UnitMeasureConversionRepo(IFactoryConnection efc)
        {
            IFactoryRepository <UnitMeasureConversion> efr = new DbContext <UnitMeasureConversion>();

            _efcmd = efr.FactoryCommand(efc);
        }
Example #32
0
 public UserApp(IFactoryConnection efc)
 {
     _epr = new UserRepo(efc);
 }