public bool IsReaderTrustworthy(CititorDTO cititor) { Cititor savedReader = readerRepository.GetObjectById(cititor.cititorId); if (savedReader.stare == 0) { return(true); } else { return(false); } }
public void LoanBook(CarteDTO book, CititorDTO reader, DateTime loanDate, DateTime deadLine) { Imprumut loan = new Imprumut() { carteId = book.carteId, cititorId = reader.cititorId, dataImprumut = loanDate, dataScadenta = deadLine }; loanRepository.InsertObject(loan); loanRepository.SaveChanges(); }
public void RegisterReader(CititorDTO cititor) { readerRepository.InsertObject(CititorTransformer.fromDtoToModel(cititor)); readerRepository.SaveChanges(); }