예제 #1
0
 public AdService(AdPortalContext context, IMapper mapper, ISieveProcessor sieveProcessor,
     IOptions<UserOptions> userOptions, IImageHelper imageHelper)
     : base(context, mapper, sieveProcessor)
 {
     _userOptions = userOptions ?? throw new ArgumentNullException(nameof(userOptions));
     _imageHelper = imageHelper ?? throw new ArgumentNullException(nameof(imageHelper));
 }
예제 #2
0
 public CityController(ApplicationDbContext context, IMapper mapper, IHttpContextAccessor httpContextAccessor, ISieveProcessor sieveProcessor)
 {
     _context             = context;
     _mapper              = mapper;
     _httpContextAccessor = httpContextAccessor;
     _sieveProcessor      = sieveProcessor;
 }
예제 #3
0
 public StudentsController(IUnitOfWork unitOfWork, ILogger <StudentsController> logger,
                           ISieveProcessor sieveProcessor)
 {
     _unitOfWork     = unitOfWork;
     _logger         = logger;
     _sieveProcessor = sieveProcessor;
 }
예제 #4
0
        public VendaController(ISieveProcessor sieveProcessor, LojaDiscosDbContext context, IMapper mapper)
        {
            _context        = context;
            _sieveProcessor = sieveProcessor;
            _mapper         = mapper;

/*
 *          Venda v = new Venda()
 *          {
 *              Id_Cliente = 1,
 *              Vl_Total = 100,
 *              Vl_TotalCashback = 23,
 *              Produtos = { new ItemVenda() { Id_Disco = 14, Preco = 177, Cashback = 7 }, new ItemVenda() { Id_Disco = 7, Preco = 143, Cashback = 2 } }
 *          };
 *          _context.Vendas.Add(v);
 *          _context.SaveChanges();
 *
 *          if (_context.Vendas.Count() == 0)
 *          {
 *              for (int i = 0; i < 200; i++)
 *              {
 *                  _context.Vendas.Add(new Venda());
 *              }
 *
 *              _context.SaveChanges();
 *          }
 */
        }
예제 #5
0
 /// <summary>
 /// RoleRepository
 /// </summary>
 /// <param name="context"></param>
 public RolesRepository(FilmstanContext context, ISieveProcessor sieveProcessor)
 {
     this.context          = context;
     this.sieveProcessor   = sieveProcessor;
     AccessLevelRepository = new AccessLevelsRpostiory(context);
     RoleEntite            = context.Set <Role>();
 }
예제 #6
0
파일: UserList.cs 프로젝트: umfaruki/exelor
 public QueryHandler(
     IApplicationDbContext dbContext,
     ISieveProcessor sieveProcessor)
 {
     _dbContext      = dbContext;
     _sieveProcessor = sieveProcessor;
 }
예제 #7
0
 public CachebaleRepository(IMapper mapper, IMemoryCache cache, IRepoOptions repoOptions, ISieveProcessor sieveProcessor)
 {
     _mapper         = mapper;
     _cache          = cache;
     _cacheItemName  = repoOptions.CacheItemName;
     _sieveProcessor = sieveProcessor;
 }
예제 #8
0
 public SortFilterService(ISieveProcessor sieveProcessor,
                          IPaginationGenerator paginationGenerator, IConfiguration configuration)
 {
     _sieveProcessor      = sieveProcessor;
     _paginationGenerator = paginationGenerator;
     _configuration       = configuration;
 }
예제 #9
0
        public StudentService(DbContext context, SieveProcessor sieveProcessor)
        {
            this._context        = context ?? throw new NullReferenceException(nameof(context));
            this._sieveProcessor = sieveProcessor ?? throw new NullReferenceException(nameof(sieveProcessor));

            this._userInfoService = new UserInfoService(context);
        }
예제 #10
0
 public IssueTicketService(IRepositoryWrapper repoWrapper, IMapper mapper, ISieveProcessor sieveProcessor, IParamService paramService, IStudentService studentService)
 {
     _repoWrapper    = repoWrapper;
     _mapper         = mapper;
     _sieveProcessor = sieveProcessor;
     _paramService   = paramService;
     _studentService = studentService;
 }
 public RenewContractService(IRepositoryWrapper repoWrapper, IStudentService studentService, ISieveProcessor sieveProcessor, IParamService paramService, IStaffService staffService)
 {
     _repoWrapper    = repoWrapper;
     _studentService = studentService;
     _sieveProcessor = sieveProcessor;
     _paramService   = paramService;
     _staffService   = staffService;
 }
예제 #12
0
 public CategoryRepository(FilmstanContext context, ISieveProcessor sieveProcessor)
 {
     this.context               = context;
     this.sieveProcessor        = sieveProcessor;
     CategoryEntite             = context.Set <Category>();
     CategoryPropertyRepository = new CategoryPropertyRepository(context);
     BrandRepository            = new BrandRepository(context, sieveProcessor);
 }
예제 #13
0
 public UsersAPIService(DatabaseContext db, IMapper mapper, ISieveProcessor sieveProcessor, IAuthService authService, IPasswordService passwordService)
 {
     m_db              = db;
     m_mapper          = mapper;
     m_sieveProcessor  = sieveProcessor;
     m_authService     = authService;
     m_passwordService = passwordService;
 }
예제 #14
0
 public UsersController(DatabaseContext db, ISieveProcessor sieveProcessor, IMapper mapper, IAuthService authService, IPasswordService passwordService)
 {
     this.db              = db;
     this.sieveProcessor  = sieveProcessor;
     this.mapper          = mapper;
     this.authService     = authService;
     this.passwordService = passwordService;
 }
예제 #15
0
 public RoomService(IRepositoryWrapper repoWrapper, IMapper mapper, IParamService param,
                    ISieveProcessor sieveProcessor)
 {
     _repoWrapper    = repoWrapper;
     _mapper         = mapper;
     _param          = param;
     _sieveProcessor = sieveProcessor;
 }
예제 #16
0
 public UserService(IOptions <AuthenticationSetting> authSettings, IRepositoryWrapper repoWrapper,
                    ISieveProcessor sieveProcessor, IMapper mapper)
 {
     _authSettings   = authSettings.Value;
     _repoWrapper    = repoWrapper;
     _sieveProcessor = sieveProcessor;
     _mapper         = mapper;
 }
예제 #17
0
 public UsersRepository(FilmstanContext context, ISieveProcessor sieveProcessor)
 {
     this.context        = context;
     this.sieveProcessor = sieveProcessor;
     Users = context.Set <User>();
     UsersRoleRepository      = new UserRoleRepository(context);
     ActivationCodeRepository = new ActivationCodeRepository(context);
 }
예제 #18
0
 public NewsService(IRepositoryWrapper repoWrapper, IMapper mapper, IAdminService admin,
                    ISieveProcessor sieveProcessor)
 {
     _repoWrapper    = repoWrapper;
     _mapper         = mapper;
     _admin          = admin;
     _sieveProcessor = sieveProcessor;
 }
예제 #19
0
 public ProductsAPIService(DatabaseContext db, IMapper mapper, ISieveProcessor sieveProcessor, IAuthService authService, IProductsFileRepoService productsFileRepo)
 {
     m_db               = db;
     m_mapper           = mapper;
     m_sieveProcessor   = sieveProcessor;
     m_authService      = authService;
     m_productsFileRepo = productsFileRepo;
 }
예제 #20
0
        public UserService(IAppSettings appSettings, DbContext context, SieveProcessor sieveProcessor, IEmailProvider emailProvider)
        {
            _context        = context ?? throw new NullReferenceException(nameof(context));
            _appSettings    = appSettings ?? throw new NullReferenceException(nameof(appSettings));
            _sieveProcessor = sieveProcessor ?? throw new NullReferenceException(nameof(sieveProcessor));
            _emailProvider  = emailProvider ?? throw new NullReferenceException(nameof(emailProvider));

            this._userInfoService = new UserInfoService(context);
        }
예제 #21
0
        public static int ApplyAndCount <T>(this ISieveProcessor sieveProcessor, SieveModel sieveModel,
                                            ref IQueryable <T> entries) where T : IEntity
        {
            entries = sieveProcessor.Apply(sieveModel, entries, applyPagination: false);
            var count = entries.Count();

            entries = sieveProcessor.Apply(sieveModel, entries, applyFiltering: false, applySorting: false);
            return(count);
        }
예제 #22
0
 public RoomTransferService(IRepositoryWrapper repoWrapper, IMapper mapper, ISieveProcessor sieveProcessor, IStudentService studentService, IParamService paramService, IUserService userService)
 {
     _repoWrapper    = repoWrapper;
     _mapper         = mapper;
     _sieveProcessor = sieveProcessor;
     _studentService = studentService;
     _paramService   = paramService;
     _userService    = userService;
 }
예제 #23
0
        public List <TEntityDto> Filter(FilterParam filterParam)
        {
            ISieveProcessor _sieveProcessor = IocManager.Instance.Resolve <ISieveProcessor>();
            var             result          = WorkScope.GetRepo <TEntity, long>().GetAll();

            result = IncludeRelationship(filterParam, result);
            result = _sieveProcessor.Apply(filterParam, result);

            return(ObjectMapper.Map <List <TEntityDto> >(result.ToList()));
        }
예제 #24
0
 public EFDomainUnitofWork(FilmstanContext context, ISieveProcessor sieveProcessor)
 {
     this.context           = context;
     this.sieveProcessor    = sieveProcessor;
     SettingRepository      = new SettingRepository(context);
     RoleRepository         = new RolesRepository(context, sieveProcessor);
     UsersRepository        = new UsersRepository(context, sieveProcessor);
     CategoryRepository     = new CategoryRepository(context, sieveProcessor);
     PostMagazineRepository = new PostMagazineRepository(context);
 }
예제 #25
0
 public ProfileController(RelationalDbContext context,
                          IAccessService <ApplicationUser> accessService,
                          IRoleHelper roleHelper,
                          UserManager <ApplicationUser> userManager,
                          ISieveProcessor sieveProcessor) : base(context, userManager)
 {
     _accessService  = accessService;
     _sieveProcessor = sieveProcessor;
     _roleHelper     = roleHelper;
 }
 public CardTemplateQueryHandler(ILogger <CardTemplateQueryHandler> logger, IDocumentStore context, IMapper mapper,
                                 ISieveProcessor sieveProc, IOptions <SieveOptions> sortFilterPagingOptions, IReadOnlyPolicyRegistry <string> registry)
 {
     _logger   = logger;
     _docStore = context;
     _mapper   = mapper;
     _sortFilterPagingProcessor = sieveProc;
     _sortFilterPagingOptions   = sortFilterPagingOptions;
     _policyRegistry            = registry;
 }
예제 #27
0
 public EquipmentService(IRepositoryWrapper repoWrapper, IMapper mapper, IAdminService admin, IRoomService room,
                         IParamService param, ISieveProcessor sieveProcessor)
 {
     _repoWrapper    = repoWrapper;
     _mapper         = mapper;
     _admin          = admin;
     _room           = room;
     _param          = param;
     _sieveProcessor = sieveProcessor;
 }
        public static IQueryable <TEntity> Apply <TEntity>(this ISieveProcessor sieveProcessor, SieveModel model,
                                                           IQueryable <TEntity> source, out int totalCount, object[] dataForCustomMethods = null) where TEntity : AuditableEntity
        {
            source = sieveProcessor.Apply(model, source, dataForCustomMethods, applyPagination: false);

            totalCount = source.Count();

            source = sieveProcessor.Apply(model, source, dataForCustomMethods, applyFiltering: false, applySorting: false);

            return(source);
        }
예제 #29
0
 public PromoterGetter(
     ISqlDbContext context,
     IMapper mapper,
     IUserGetter userGetter,
     ISieveProcessor sieveProcessor)
 {
     _context        = context;
     _mapper         = mapper;
     _userGetter     = userGetter;
     _sieveProcessor = sieveProcessor;
 }
예제 #30
0
 public AssetCategoryService(IAssetCategoryRepository assetCategoryRepository,
                             IMapper mapper,
                             IBus bus,
                             ISieveProcessor sieveProcessor,
                             IOptions <SieveOptions> sieveOptions)
 {
     _assetCategoryRepository = assetCategoryRepository;
     _mapper         = mapper;
     _bus            = bus;
     _sieveProcessor = sieveProcessor;
     _sieveOptions   = sieveOptions.Value;
 }