public PeriodoServico(
     IPeriodoRepositorio periodoRepositorio,
     IUow uow)
 {
     _periodoRepositorio = periodoRepositorio;
     _uow = uow;
 }
Exemple #2
0
        private readonly AppSettings _appSettings; //here i will get the Values storage in appsettings.json that will be used to generate my Token

        public UserController(IUow uow, IUserRepository repository, UserHandler handler, IOptions <AppSettings> appSettings) : base(uow)
        {
            _uow         = uow;
            _repository  = repository;
            _handler     = handler;
            _appSettings = appSettings.Value;
        }
        private void btnUOW_Click(object sender, EventArgs e)
        {
            IUow uow = FactoryDalLayer <IUow> .Create("EfUOW");

            try
            {
                CustomerBase cust1 = new CustomerBase();
                cust1.CustomerType = "Lead";
                cust1.CustomerName = "Cust1";

                // Unit of work

                Idal.SetUnitWork(uow);
                Idal.Add(cust1); // In memory


                cust1 = new CustomerBase();
                cust1.CustomerType = "Lead";
                cust1.CustomerName = "Cust2";
                cust1.Address      = "dzxcczxcxzcxzcsdhksjahdkjsahkdjhsakjdh kjashdkjahsd kjahskjdh kajsdhasd";
                IRepository <CustomerBase> dal1 = FactoryDalLayer <IRepository <CustomerBase> >
                                                  .Create(DalLayer.Text); // Unit

                dal1.SetUnitWork(uow);
                dal1.Add(cust1); // In memory

                uow.Committ();
            }
            catch (Exception ex)
            {
                uow.RollBack();
                MessageBox.Show(ex.Message.ToString());
            }
        }
        public OrderController(IUow uow, OrderCommandHandler orderCommandHandler, IOrderAdoRepository orderAdoRepository)
            : base(uow)
        {
            _orderCommandHandler = orderCommandHandler;

            _orderAdoRepository = orderAdoRepository;
        }
Exemple #5
0
 public CategoriaServico(
     ICategoriaRepositorio categoriaRepositorio,
     IUow uow)
 {
     _categoriaRepositorio = categoriaRepositorio;
     _uow = uow;
 }
 public override void SeUnitOfWork(IUow uow)
 {
     objConn                = ((AdoUow)uow).Connection;
     objCommand             = new SqlCommand();
     objCommand.Connection  = objConn;
     objCommand.Transaction = ((AdoUow)uow).Transaction;
 }
 public WithdrawController(IWithdrawDomain withdrawal, IUow uow, IBalanceDomain balanceDomain, IAccountDetailsDomain accountDomain)
 {
     Uow                  = uow;
     WithdrawDomain       = withdrawal;
     BalanceDomain        = balanceDomain;
     AccountDetailsDomain = accountDomain;
 }
Exemple #8
0
 public CypherSchemesChildren(BusinessAggregateParams <CypherScheme> parentParams, int?cypherId, int?replacementRuleId)
 {
     _uow              = (IUow)parentParams.UOW;
     _context          = (IPuzzleContext)parentParams.Context;
     CypherId          = cypherId.Value;
     ReplacementRuleId = replacementRuleId.Value;
 }
Exemple #9
0
 public EfCrudRepository(TContext c, IExpressionBuilder expressionBuilder, IUow <TEntity> uow, ILogger <EfCrudRepository <TEntity, TContext> > logger)
     : base(c, expressionBuilder, logger)
 {
     _c   = c;
     _uow = uow;
     c.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.TrackAll;
 }
Exemple #10
0
        private void btnUOW_Click(object sender, EventArgs e)
        {
            IUow uow = FactoryDalLayer <IUow> .Create("EfUOW");

            try
            {
                CustomerBase cust1 = new CustomerBase();
                cust1.CustomerType = "Admin";
                cust1.CustomerName = "Cust1";

                // Unit of work

                Idal.SetUnitWork(uow);
                Idal.Add(cust1); // In memory


                cust1 = new CustomerBase();
                cust1.CustomerType = "Admin";
                cust1.CustomerName = "Cust2";
                cust1.Email        = "*****@*****.**";
                IRepository <CustomerBase> dal1 = FactoryDalLayer <IRepository <CustomerBase> >
                                                  .Create(DalLayer.Text); // Unit

                dal1.SetUnitWork(uow);
                dal1.Add(cust1); // In memory

                uow.Committ();
            }
            catch (Exception ex)
            {
                uow.RollBack();
                MessageBox.Show(ex.Message.ToString());
            }
        }
Exemple #11
0
 public PMSController(IRepository <ProjectBase> ObjectOfProjectRepository, EUow ObjectOfUnitOfWork)
 {
     //set unit of work with connection string to connect to database
     _ObjectUnitOfWork = ObjectOfUnitOfWork;
     ObjectOfProjectRepository.SetUnitWork(_ObjectUnitOfWork);
     _objectOfProjectRepository = ObjectOfProjectRepository;
 }
 public ContaServico(
     IContaRepositorio contaRepositorio,
     IUow uow)
 {
     _contaRepositorio = contaRepositorio;
     _uow = uow;
 }
Exemple #13
0
 public DigitalAssetController(IDigitalAssetService digitalAssetService, IUow uow, ICacheProvider cacheProvider)
 {
     _digitalAssetService = digitalAssetService;
     _uow        = uow;
     _repository = uow.DigitalAssets;
     _cache      = cacheProvider.GetCache();
 }
 public IdentityService(IUow uow, IEncryptionService encryptionService, ISessionService sessionService, ICacheProvider cacheProvider)
     : base(cacheProvider)
 {
     this.uow               = uow;
     this.sessionService    = sessionService;
     this.encryptionService = encryptionService;
 }
Exemple #15
0
        private void btnUOW_Click(object sender, EventArgs e)
        {
            IUow uow = FactoryDAL <IUow> .Create("EFUow");

            try
            {
                CustomerBase cust1 = new CustomerBase();
                cust1.CustomerType = "Lead";
                cust1.CustomerName = "Cust1";
                cust1.BillDate     = Convert.ToDateTime(txtBillingDate.Text);
                IRepository <CustomerBase> dal1 = FactoryDAL <IRepository <CustomerBase> > .Create(DalLayer.Text);

                dal1.SetUnitOfWork(uow);
                dal1.Add(cust1);

                CustomerBase cust2 = new CustomerBase();
                cust2.CustomerType = "Lead";
                cust2.CustomerName = "Cust2";
                cust2.BillDate     = Convert.ToDateTime(txtBillingDate.Text);
                cust2.Address      = "111111111111111111111111111111111111111111111111111111111111111";
                IRepository <CustomerBase> dal2 = FactoryDAL <IRepository <CustomerBase> > .Create(DalLayer.Text);

                dal2.SetUnitOfWork(uow);
                dal2.Add(cust2);

                uow.Commit();
            }
            catch (Exception ex)
            {
                uow.RollBack();
                MessageBox.Show(ex.Message);
            }
        }
 public CartaoCreditoServico(
     ICartaoCreditoRepositorio cartaoCreditoRepositorio,
     IUow uow)
 {
     _cartaoCreditoRepositorio = cartaoCreditoRepositorio;
     _uow = uow;
 }
 public ItemController(
     InserirItemCommandHandler inserirItemCommandHandler,
     IUow uow)
 {
     _inserirItemCommandHandler = inserirItemCommandHandler;
     _uow = uow;
 }
 public ProjectsDataController(IRepository <ProjectBase> ObjectOfProjectRepository, EUow ObjectOfUnitOfWork)
 {
     //set unit of work with connection string to connect to database
     _ObjectUnitOfWork = ObjectOfUnitOfWork;
     ObjectOfProjectRepository.SetUnitWork(_ObjectUnitOfWork);
     _objectOfProjectRepository    = ObjectOfProjectRepository;
     _ObjectOfProjectBusinessLogic = new ProjectBusinessLogic(_objectOfProjectRepository);
 }
 public CustomerController(CustomerCommandHandler customerCommandHandler, ICustomerRepository customerRepository,
                           IEmailService emailService,
                           IUow uow) : base(uow)
 {
     _customerRepository = customerRepository;
     _emailService       = emailService;
     _handler            = customerCommandHandler;
 }
Exemple #20
0
 public override void SetUnitWork(IUow uow)
 {
     objUow                 = uow;
     objConnection          = ((AdoUow)uow).connection;
     objCommand             = new SqlCommand();
     objCommand.Connection  = objConnection;
     objCommand.Transaction = ((AdoUow)uow).transaction;
 }
Exemple #21
0
 public DepositController(IUow uow, IDepositDomain depositDomain, IBalanceDomain balanceDomain, IAccountDetailsDomain accountDomain, ICardDomain cardDomain)
 {
     Uow                  = uow;
     DepositDomain        = depositDomain;
     BalanceDomain        = balanceDomain;
     AccountDetailsDomain = accountDomain;
     CardDomain           = cardDomain;
 }
Exemple #22
0
 public DigitalAssetController(ICacheProvider cacheProvider, IDigialAssetService digitalAssetService, IUow uow, ITraceService traceService)
 {
     _digitalAssetService = digitalAssetService;
     _uow          = uow;
     _repository   = uow.DigitalAssets;
     _cache        = cacheProvider.GetCache();
     _traceService = traceService;
 }
 public UserOnlyStore(
     IUow uow,
     IdentityErrorDescriber errorDescriber = null
     ) : base(errorDescriber ?? new IdentityErrorDescriber())
 {
     _uow     = uow;
     _session = uow.GetSession() ?? throw new ArgumentNullException(nameof(_session));
 }
 public OrderDetailController(IUow uow, IOrderDetailDomain orderDetailDomain, ICartDomain cartDomain, IOrderDomain orderDomain, ICardDomain cardDomain, IBalanceDomain balanceDomain)
 {
     Uow = uow;
     OrderDetailDomain = orderDetailDomain;
     CartDomain        = cartDomain;
     OrderDomain       = orderDomain;
     CardDomain        = cardDomain;
     BalanceDomain     = balanceDomain;
 }
 public ProductController(
     IUow uow,
     ProductHandler productHandler,
     IProductRepository productRepository,
     IMemoryCache memoryCache) : base(uow)
 {
     _productHandler    = productHandler;
     _productRepository = productRepository;
     _memoryCache       = memoryCache;
 }
Exemple #26
0
 public SaleService(IUow uow)
 {
     if (uow == null)
     {
         throw new ArgumentNullException("uow");
     }
     this.uow      = uow;
     unitHelper    = new UnitHelper(uow.UnitRepository.GetAll().ToList());
     igvPercentage = 18;
 }
 public PedidoController(
     CancelarPedidoCommandHandler cancelarPedidoCommandHandler,
     IniciarPreparoPedidoCommandHandler iniciarPreparoPedidoCommandHandler,
     FinalizarPedidoCommandHandler finalizarPedidoCommandHandler,
     IUow uow)
 {
     _cancelarPedidoCommandHandler       = cancelarPedidoCommandHandler;
     _iniciarPreparoPedidoCommandHandler = iniciarPreparoPedidoCommandHandler;
     _finalizarPedidoCommandHandler      = finalizarPedidoCommandHandler;
     _uow = uow;
 }
Exemple #28
0
        private List <CustomerBase> LoadGrid()
        {
            IRepository <CustomerBase> dal = null;

            dal = FactoryCustomer.CreateDAL("CustomerDAL");

            IUow unitOfWork = (IUow)FactoryCustomer.CreateUOW();

            dal.SetUnitOfWork(unitOfWork);
            return(dal.GetAll());
        }
 public ComandaController(
     AbrirComandaCommandHandler abrirComandaCommandHandler,
     FecharComandaCommandHandler fecharComandaCommandHandler,
     AdicionarPedidoCommandHandler adicionarPedidoCommandHandler,
     IUow uow)
 {
     _abrirComandaCommandHandler    = abrirComandaCommandHandler;
     _fecharComandaCommandHandler   = fecharComandaCommandHandler;
     _adicionarPedidoCommandHandler = adicionarPedidoCommandHandler;
     _uow = uow;
 }
Exemple #30
0
 public void InitializeJukeBox(IUow uow)
 {
     repo = new RepositoryJukeBox(uow);
     if (!IsPosInitialized)
     {
         Position         = 0;
         IsPosInitialized = true;
         TimeToWait       = -1;
         Active           = false;
     }
 }
Exemple #31
0
        public static async Task SaveLog(IUow uow, string message, string userId)
        {
            uow._ManagerLog.Add(new EF.ManagerLog
            {
                EventDateTime = DateTime.UtcNow,
                EventDetails = message,
                UserId=userId
            });

            await uow.CommitAsync();
        }
 public CategoryController(IUow uow)
 {
     _Uow = uow;
 }
 public VideosController(IUow uow)
 {
     _Uow = uow;
 }
 public UserController(IUow uow)
 {
     _uow = uow;
 }
Exemple #35
0
 public CultureController(IUow uow, IGlobalizationSettings settings)
 {
     Uow = uow;
     _globalizationSettings = settings;
 }
 public CountryController(IUow uow)
 {
     _Uow = uow;
 }
 public ReportsController(IUow uow)
 {
     _Uow = uow;
 }
 public NewFeaturesController(IUow uow)
 {
     _Uow = uow;
 }
 public GlobalizationSettings(IUow uow)
 {
     Uow = uow;
 }
 public SupportController(IUow uow)
 {
     _Uow = uow;
 }
 public SubscriptionController(IUow uow)
 {
     _Uow = uow;
 }
 public RoleController(IUow uow)
 {
     _Uow = uow;
 }
Exemple #43
0
 //
 // GET: /Language/
 public LanguageController(IUow uow, IGlobalizationSettings settings)
 {
     Uow = uow;
     _globalizationSettings = settings;
 }
 public HomeController(IUow uow)
 {
     _UOW = uow;
 }
 public AccountController(IUow uow)
 {
     _Uow = uow;
 }