Beispiel #1
0
        public async Task <IReadOnlyCollection <TransactionTypeDto> > GetTransactionTypesByBudgetIdAsync(GetTransactionTypesByBudgetIdRequest request, CancellationToken cancellationToken)
        {
            var caller = CallerExtensions.LogCaller();
            var dtos   = await GetAsync(() => _transactionTypeService.GetTransactionTypesByBudgetId(request.BudgetId), caller.Method, cancellationToken);

            return(dtos);
        }
        public async Task <UserDto> GetUserByIdAsync(GetUserByIdRequest request, CancellationToken cancellationToken)
        {
            var caller = CallerExtensions.LogCaller();
            var dto    = await GetByIdAsync(() => _userService.GetUserById(request.Id), caller.Method, cancellationToken);

            return(dto);
        }
Beispiel #3
0
        public async Task <Page <BudgetDto> > SearchBudgetsAsync(SearchBudgetsRequest request, PaginationRequest paginationRequest, CancellationToken cancellationToken)
        {
            var caller  = CallerExtensions.LogCaller();
            var pageDto = await SearchAsync((pageOptions) => _budgetService.SearchBudgets(request.Filter, request.Sort, pageOptions), paginationRequest, caller.Method, cancellationToken);

            return(pageDto);
        }
Beispiel #4
0
        public async Task <IncomeDto> CreateIncomeAsync(CreateIncomeRequest request, CancellationToken cancellationToken)
        {
            var caller = CallerExtensions.LogCaller();
            var dto    = await RunAlternateRequestAndDispatchEventAsync <CreateIncomeRequest, IncomeCreateDefinition, IncomeDto, Domain.Entities.Income>(x => _transactionService.CreateIncome(x), request, caller.Method, cancellationToken);

            return(dto);
        }
Beispiel #5
0
        public async Task <Page <TransactionDto> > SearchTransactionsByBudgetIdAsync(SearchTransactionsByBudgetIdRequest request, PaginationRequest paginationRequest, CancellationToken cancellationToken)
        {
            var caller  = CallerExtensions.LogCaller();
            var pageDto = await SearchAsync((pageOptions) => _transactionService.SearchTransactionsByBudgetId(request.BudgetId, request.Filter, request.Sort, pageOptions), paginationRequest, caller.Method, cancellationToken);

            return(pageDto);
        }
        public async Task <SalaryEntryDto> CreateSalaryEntryAsync(CreateSalaryEntryRequest request, CancellationToken cancellationToken)
        {
            var caller = CallerExtensions.LogCaller();
            var dto    = await RunRequestAndDispatchEventAsync <CreateSalaryEntryRequest, SalaryEntryCreateDefinition>(x => _salaryEntryService.CreateSalaryEntry(x), request, caller.Method, cancellationToken);

            return(dto);
        }