Beispiel #1
0
        private BookPenalty BuildPenaltyDomainObject(BooksActivity currentCheckedOutBook, CheckInCommand request, decimal penaltyFee, long lateDays)
        {
            var penaltyReq = new BookPenalty
            {
                ExpectedReturnDate = currentCheckedOutBook.ExpectedReturnDate,
                NumberOfDaysLate   = Convert.ToInt64(lateDays),
                CheckOutActivityId = request.CheckOutActivityId,
                BookId             = request.BookId,
                PenaltyFee         = penaltyFee,
                CustomerId         = currentCheckedOutBook.CustomerId,
                AdminUserId        = request.AdminUserId
            };

            return(penaltyReq);
        }
Beispiel #2
0
 public Task <bool> PenalizeAsync(BookPenalty penalty)
 {
     throw new NotImplementedException();
 }
Beispiel #3
0
        public async Task <bool> PenalizeAsync(BookPenalty penalty)
        {
            await _dataContext.BookPenalties.AddAsync(penalty);

            return(1 > 0);
        }