public ApplicationDbContext( DbContextOptions options, ICurrentContextService currentContextService) : base(options) { _currentContextService = currentContextService; }
public UniquePredicate(IApplicationDbContext db, ICurrentContextService userAccessor) { Ensure.That(db, nameof(db)).IsNotNull(); Ensure.That(userAccessor, nameof(userAccessor)).IsNotNull(); _db = db; _userAccessor = userAccessor; }
public ExistsInCurrentContextValidator( IApplicationDbContext db, ICurrentContextService currentContextService) { Ensure.That(db, nameof(db)).IsNotNull(); Ensure.That(currentContextService, nameof(currentContextService)).IsNotNull(); _db = db; _currentContextService = currentContextService; }
public virtual void OnInitialized(IContainerProvider containerProvider) { secureCommands = new List <DelegateCommand>(); this._shellExtensionService = containerProvider.Resolve <IShellExtensionService>(); this._currentContextService = containerProvider.Resolve <ICurrentContextService>(); this._container = containerProvider; this._authenticationService = _container.Resolve <IAuthenticationUIService>(); this._eventAggregator = _container.Resolve <IEventAggregator>(); this._eventAggregator.GetEvent <AuthenticatedEvent>().Subscribe(HandleUserAuthentication); }
public UniqueInCurrentContextValidator( IApplicationDbContext db, ICurrentContextService userAccessor, Func <T, Expression <Func <TEntity, bool> > > predicate) { Ensure.That(db, nameof(db)).IsNotNull(); Ensure.That(userAccessor, nameof(userAccessor)).IsNotNull(); Ensure.That(predicate, nameof(predicate)).IsNotNull(); _db = db; _userAccessor = userAccessor; _predicate = predicate; }
public UniqueWithInstanceInCurrentContextValidator( IApplicationDbContext db, ICurrentContextService currentContextService, Func <T, object> propertyFinder, Func <TEntity, T, Expression <Func <TEntity, bool> > > predicate) { Ensure.That(db, nameof(db)).IsNotNull(); Ensure.That(currentContextService, nameof(currentContextService)).IsNotNull(); Ensure.That(propertyFinder, nameof(propertyFinder)).IsNotNull(); Ensure.That(predicate, nameof(predicate)).IsNotNull(); _db = db; _currentContextService = currentContextService; _propertyFinder = propertyFinder; _predicate = predicate; }
public ExistsInCurrentContextValidatorProvider(IApplicationDbContext db, ICurrentContextService userAccessor) => (_db, _userAccessor) = (db, userAccessor);
public GetAccountsListQueryHandler(IApplicationDbContext db, ICurrentContextService currentContextService) => (_db, _currentContextService) = (db, currentContextService);
public Workitem(IContainerExtension container) { _containerProvider = container; _shellExtensionService = container.Resolve <IShellExtensionService>(); _currentContextService = container.Resolve <ICurrentContextService>(); }
public DeleteTransactionCommandHandler(IApplicationDbContext db, ICurrentContextService userAccessor) { _db = db; _userAccessor = userAccessor; }
public GetTransactionQueryHandler(IApplicationDbContext db, ICurrentContextService userAccessor) { _db = db; _userAccessor = userAccessor; }
public EditTagCommandHandler(IApplicationDbContext db, ICurrentContextService userAccessor) => _db = db;