public QueryOperationsUseCase(BaseDomainService service, Func <Exception, string> onError, RequestDelegate <QueryContext <TService> > pipeline)
 {
     _serviceContainer = (IServiceContainer <TService>)service.ServiceContainer;
     _service          = service;
     _onError          = onError ?? throw new ArgumentNullException(nameof(onError));
     _pipeline         = pipeline;
 }
 public CRUDOperationsUseCase(BaseDomainService service,
                              CRUDServiceMethods serviceMethods,
                              RequestDelegate <CRUDContext <TService> > pipeline)
 {
     _service          = service;
     _serviceContainer = (IServiceContainer <TService>)service.ServiceContainer;
     _serviceMethods   = serviceMethods;
     _pipeline         = pipeline;
 }
Esempio n. 3
0
 public RequestContext(BaseDomainService dataService,
                       DbSet dbSet = null,
                       ChangeSetRequest changeSet     = null,
                       RowInfo rowInfo                = null,
                       QueryRequest queryInfo         = null,
                       ServiceOperationType operation = ServiceOperationType.None)
 {
     DataService      = dataService ?? throw new ArgumentNullException(nameof(dataService));
     CurrentDbSet     = dbSet;
     CurrentChangeSet = changeSet;
     CurrentRowInfo   = rowInfo;
     CurrentQueryInfo = queryInfo;
     CurrentOperation = operation;
     _dataBag         = null;
 }
Esempio n. 4
0
 public ICRUDOperationsUseCase Create(BaseDomainService service, CRUDServiceMethods serviceMethods)
 {
     return(_func(service, serviceMethods));
 }
 public IQueryOperationsUseCase Create(BaseDomainService service, Func <Exception, string> onError)
 {
     return(_func(service, onError));
 }