コード例 #1
0
ファイル: OutputStockRepo.cs プロジェクト: leonardo1994/ERP
        public OutputStockRepo(IFactoryConnection efc)
        {
            IFactoryRepository <OutputStock> efr = new DbContext <OutputStock>();

            _conn  = efc;
            _efcmd = efr.FactoryCommand(efc);
        }
コード例 #2
0
 public IntegrationCapeStockApp(IFactoryConnection efc)
 {
     _epr            = new IntegrationCapeStockRepo(efc);
     _inputStockApp  = new InputStockApp(efc);
     _outputStockApp = new OutputStockApp(efc);
     _stockMapper    = new StockMapper();
     _conn           = efc;
 }
コード例 #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>();
 }
コード例 #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>();
 }
コード例 #5
0
 public OsProductApp(IFactoryConnection efc)
 {
     _epr   = new OsProductRepo(efc);
     _osApp = new OrderOfServiceApp(efc);
     _integrationCapeStockApp  = new IntegrationCapeStockApp(efc);
     _integrationItemsStockApp = new IntegrationItemsStockApp(efc);
     _conn = efc;
 }
コード例 #6
0
 public IntegrationItemsStockApp(IFactoryConnection efc)
 {
     _epr = new IntegrationItemsStockRepo(efc);
     _itemInputStockApp  = new ItemInputStockApp(efc);
     _itemOutputStockApp = new ItemOutputStockApp(efc);
     _stockMapper        = new StockMapper();
     _conn = efc;
 }
コード例 #7
0
ファイル: FactoryController.cs プロジェクト: Sorlom/Test2
        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"));
        }
コード例 #8
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);
        }
コード例 #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);
        }
コード例 #10
0
ファイル: FilterCompanyApp.cs プロジェクト: leonardo1994/ERP
 public FilterCompanyApp(IFactoryConnection efc)
 {
     _epr = new FilterCompanyRepo(efc);
 }
コード例 #11
0
ファイル: VehicleApp.cs プロジェクト: leonardo1994/ERP
 public VehicleApp(IFactoryConnection efc)
 {
     _epr = new VehicleRepo(efc);
 }
コード例 #12
0
 public TranslateApp(IFactoryConnection efc)
 {
     _epr = new TranslateRepo(efc);
 }
コード例 #13
0
 public OsServiceApp(IFactoryConnection efc)
 {
     _epr = new OsServiceRepo(efc);
 }
コード例 #14
0
        public CboRepo(IFactoryConnection efc)
        {
            IFactoryRepository <Cbo> efr = new DbContext <Cbo>();

            _efcmd = efr.FactoryCommand(efc);
        }
コード例 #15
0
        public InstallmentOfAccountsReceivableRepo(IFactoryConnection efc)
        {
            IFactoryRepository <InstallmentOfAccountsReceivable> efr = new OdbcSqlServer <InstallmentOfAccountsReceivable>();

            _efcmd = efr.FactoryCommand(efc);
        }
コード例 #16
0
ファイル: ReligionRepo.cs プロジェクト: leonardo1994/ERP
        public ReligionRepo(IFactoryConnection efc)
        {
            IFactoryRepository <Religion> efr = new DbContext <Religion>();

            _efcmd = efr.FactoryCommand(efc);
        }
コード例 #17
0
 public TypeDocumentFinancialApp(IFactoryConnection efc)
 {
     _epr = new TypeDocumentFinancialRepo(efc);
 }
コード例 #18
0
ファイル: DbTableRepo.cs プロジェクト: leonardo1994/ERP
        public DbTableRepo(IFactoryConnection efc)
        {
            IFactoryRepository <DbTable> efr = new DbContext <DbTable>();

            _efcmd = efr.FactoryCommand(efc);
        }
コード例 #19
0
ファイル: OsStockApp.cs プロジェクト: leonardo1994/ERP
 public OsStockApp()
 {
     _epr = new OsStockRepo();
 }
コード例 #20
0
        public VehicleModelVehicleRepo(IFactoryConnection efc)
        {
            IFactoryRepository <VehicleModelVehicle> efr = new OdbcSqlServer <VehicleModelVehicle>();

            _efcmd = efr.FactoryCommand(efc);
        }
コード例 #21
0
 public TaxationApp(IFactoryConnection efc)
 {
     _epr = new TaxationRepo(efc);
 }
コード例 #22
0
ファイル: StateRepo.cs プロジェクト: leonardo1994/ERP
        public StateRepo(IFactoryConnection efc)
        {
            IFactoryRepository <State> efr = new DbContext <State>();

            _efcmd = efr.FactoryCommand(efc);
        }
コード例 #23
0
ファイル: LegalPersonRepo.cs プロジェクト: leonardo1994/ERP
        public LegalPersonRepo(IFactoryConnection efc)
        {
            IFactoryRepository <LegalPerson> efr = new DbContext <LegalPerson>();

            _efcmd = efr.FactoryCommand(efc);
        }
コード例 #24
0
ファイル: OsProductRepo.cs プロジェクト: leonardo1994/ERP
        public OsProductRepo(IFactoryConnection efc)
        {
            IFactoryRepository <OsProduct> efr = new DbContext <OsProduct>();

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

            _efcmd = efr.FactoryCommand(efc);
        }
コード例 #28
0
 public SpecialTaxApp(IFactoryConnection efc)
 {
     _epr = new SpecialTaxRepo(efc);
 }
コード例 #29
0
ファイル: UnitMeasureApp.cs プロジェクト: leonardo1994/ERP
 public UnitMeasureApp(IFactoryConnection efc)
 {
     _epr = new UnitMeasureRepo(efc);
 }
コード例 #30
0
ファイル: factory_spec.cs プロジェクト: PeddleM/btw-samples
 protected void When(IFactoryCommand when)
 {
     WhenMessage(when);
 }
コード例 #31
0
        public UnitMeasureConversionRepo(IFactoryConnection efc)
        {
            IFactoryRepository <UnitMeasureConversion> efr = new DbContext <UnitMeasureConversion>();

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