Exemplo n.º 1
0
        private Task <IList <Loan> > GetLoansBetweenUsers(Guid loanerId, Guid loaneeId, Guid?groupContextId)
        {
            var filterData = new LoanFilterInfo()
            {
                LoaneeId = loaneeId,
                LoanerId = loanerId,
                GroupId  = groupContextId,
            };

            var dbFilter = loanDbFilterFactory.Create(filterData);

            return(loanRepository.GetAllAsync(dbFilter));
        }
Exemplo n.º 2
0
        // GET: Loans
        public async Task <ActionResult> Index()
        {
            var loans = await _loanRepository.GetAllAsync();

            return(View(loans));
        }
Exemplo n.º 3
0
        public Task <IList <Loan> > GetFilteredLoansAsync(LoanFilterInfo loanFilterInfo)
        {
            var filter = loanDbFilterFactory.Create(loanFilterInfo);

            return(loanRepository.GetAllAsync(filter));
        }
Exemplo n.º 4
0
        /// <summary>
        /// Funkcja do pobierania informacji o wszystkich trwających wypożyczeniach
        /// </summary>
        /// <returns></returns>
        // GET: api/Loans
        public async Task <IHttpActionResult> GetLoans()
        {
            var loans = await _loanRepository.GetAllAsync();

            return(Ok(_mapper.Map <List <LoanOutputModel> >(loans)));
        }