public QueryDescriptionToSql_Grouping(DBInitializer init)
 {
     repository = init.Repository;
     provider   = new ODataQueryProvider();
 }
 public StockService(ICRUDRepository <Product> productRepository, MNBService mnbService)
 {
     this.productRepository = productRepository;
     this.mnbService        = mnbService;
 }
Example #3
0
 public abstract void UpdateList <D>(ICRUDRepository repo, MappingContext context, bool full, IEnumerable <D> oldValues, IEnumerable <D> newValues);
Example #4
0
 public TransactionViewModelManager()
 {
     _transactionManager = new TransactionManager();
 }
Example #5
0
 public async Task SaveChanges(ICRUDRepository repo)
 {
     await repo.SaveChanges();
 }
Example #6
0
 public void UpdateKeys(ICRUDRepository repo)
 {
     repo.UpdateKeys();
 }
Example #7
0
 public SuperHeroService(string token)
 {
     _repo = new SuperHeroRepository_api(token);
 }
Example #8
0
 public async Task <DataPage <D> > GetPage <D>(ICRUDRepository repo, Expression <Func <D, bool> > filter, Func <IQueryable <D>, IOrderedQueryable <D> > sorting, int page, int itemsPerPage, Func <IQueryable <D>, IQueryable <D> > grouping = null)
 {
     return(await repo.GetPage <D>(filter, sorting, page, itemsPerPage, grouping));
 }
Example #9
0
 public RecursiveCopier(DBInitializerAdvanced init)
 {
     repository = init.Repository;
     context    = init.Context;
 }
Example #10
0
 public CertificateController(ICRUDRepository repo)
 {
     _repo = repo;
 }
Example #11
0
        /// <summary>
        /// Creates an <see cref="AsyncObservableCollectionView{T}"/> and binds the repository changes to the collection
        /// </summary>
        public static async Task <AsyncObservableCollectionView <T> > ToAsyncObservableCollectionView <T, TKey>(this ICRUDRepository <T, TKey> repo, FilterHandler <T> filter)
            where T : IUniqueObject <TKey>
        {
            var items = await repo.GetItems();

            var collection = AsyncObservableCollectionView <T> .Create(filter, items);

            collection.BindToRepositoryChanges(repo);
            return(collection);
        }
Example #12
0
 public HistoryController(ICRUDRepository repo)
 {
     _repo = repo;
 }
Example #13
0
 /// <summary>
 /// Updates the collection base on the operation type
 /// </summary>
 public static void BindToRepositoryChanges <T, TKey>(this IList <T> collection, ICRUDRepository <T, TKey> repo, Func <T, bool> predicate)
     where T : IUniqueObject <TKey>
 {
     repo.ItemsChanged += (s, e) =>
     {
         if (predicate(e.Item))
         {
             collection.Update(e);
         }
     };
 }
Example #14
0
 /// <summary>
 /// Updates the collection base on the operation type
 /// </summary>
 public static void BindToRepositoryChanges <T, TKey>(this IList <T> collection, ICRUDRepository <T, TKey> repo)
     where T : IUniqueObject <TKey>
 {
     repo.ItemsChanged += collection.Update;
 }
 public DefaultWebQueryRepository(ICRUDRepository sourceRepository)
 {
     SourceRepository = sourceRepository;
 }
Example #16
0
 public abstract Task <D> GetById <D, K>(ICRUDRepository repo, MappingContext context, K key);
Example #17
0
 public HomeController(ICRUDRepository <Post> postCrudRepository, IPostRepository postRepository, ICRUDRepository <User> userCrudRepository)
 {
     this.postCrudRepository = postCrudRepository;
     this.postRepository     = postRepository;
     this.userCrudRepository = userCrudRepository;
 }
Example #18
0
 public async Task <DataPage <T1> > GetPageExtended <T1, T2>(ICRUDRepository repo, Expression <Func <T1, bool> > filter, Func <IQueryable <T2>, IOrderedQueryable <T2> > sorting, int page, int itemsPerPage, Func <IQueryable <T1>, IQueryable <T2> > grouping = null) where T2 : T1
 {
     return
         (await repo.GetPageExtended <T1, T2>(filter, sorting, page, itemsPerPage, grouping));
 }
Example #19
0
 protected CRUDManager(IUnitOfWork unitOfWork, ICRUDRepository <TEntity, TKey> repository, IMapper mapper) : base(unitOfWork, repository, mapper)
 {
     _unitOfWork = unitOfWork ?? throw new ArgumentNullException();
     _repository = repository ?? throw new ArgumentNullException();
     _mapper     = mapper ?? throw new ArgumentNullException();
 }
Example #20
0
 public abstract void Update <D>(ICRUDRepository repo, MappingContext context, bool full, params D[] viewModel);
Example #21
0
 public StudentLoggerRepository(ICRUDRepository <T> decorated)
 {
     _decorated = decorated;
 }
Example #22
0
 public virtual async Task <DataPage <D> > ExecuteQuery <D, D1>(ICRUDRepository repo, MappingContext context, object query)
     where D1 : D
 {
     return(null);
 }
Example #23
0
 internal BaseCRUDService(ICRUDRepository <T> repository) => Repository = repository;
 public MinisterialEffectController(IMinisterialEffectRepository repository, IMapper mapper, CreateMinisterialEffectUseCase createEffect, UpdateMinisterialEffectUseCase updateEffect, ICRUDRepository crudRepository)
 {
     _repository     = repository;
     _mapper         = mapper;
     _createEffect   = createEffect;
     _updateEffect   = updateEffect;
     _crudRepository = crudRepository;
 }
Example #25
0
 public Func <object, object> GetGetKey(ICRUDRepository repo) => repo.GetKey;
 public CreateMinisterialEffectUseCase(ICRUDRepository crudRepository, IMapper mapper)
 {
     _crudRepository = crudRepository;
     _mapper         = mapper;
 }
Example #27
0
 public abstract void Add <S>(ICRUDRepository repo, MappingContext context, bool full, params S[] viewModel);
Example #28
0
 public SubjectController(ICRUDRepository repo, IMapper mapper)
 {
     _mapper = mapper;
     _repo   = repo;
 }
Example #29
0
 public void Delete <K>(ICRUDRepository repo, params K[] key)
 {
     repo.Delete <K>(key);
 }
Example #30
0
 public AccountController(IAuthRepository repo, IConfiguration config, IMapper mapper, ICRUDRepository repository)
 {
     _repository = repository;
     _mapper     = mapper;
     _config     = config;
     _repo       = repo;
 }
Example #31
0
 public static ICRUDRepository<User> GetUserRepository()
 {
     if(UserRepo == null)
     {
         UserRepo = new UserRepository();
     }
     return UserRepo;
 }