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); }
public Task <bool> PenalizeAsync(BookPenalty penalty) { throw new NotImplementedException(); }
public async Task <bool> PenalizeAsync(BookPenalty penalty) { await _dataContext.BookPenalties.AddAsync(penalty); return(1 > 0); }