Example #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="context">the context dependency</param>
 /// <param name="eventBus">The event bus.</param>
 /// <param name="workingDaysCalculator">The working days calculator.</param>
 /// <param name="eventBusEnabled">if set to <c>true</c> [event bus enabled].</param>
 public VacationRequestRepository(MyCompanyContext context, IEventBus eventBus, IWorkingDaysCalculator workingDaysCalculator, bool eventBusEnabled)
 {
     _eventBusEnabled       = eventBusEnabled;
     _eventBus              = eventBus;
     _workingDaysCalculator = workingDaysCalculator;
     _context = context;
 }
Example #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="eventBus"></param>
        /// <param name="eventBusEnabled"></param>
        /// <param name="context">The EF context</param>
        public ExpenseRepository(MyCompany.Common.EventBus.IEventBus eventBus, bool eventBusEnabled, MyCompanyContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            _context         = context;
            _eventBusEnabled = eventBusEnabled;
            _eventBus        = eventBus;
        }