コード例 #1
0
        public bool IsReaderTrustworthy(CititorDTO cititor)
        {
            Cititor savedReader = readerRepository.GetObjectById(cititor.cititorId);

            if (savedReader.stare == 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
        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();
        }
コード例 #3
0
 public void RegisterReader(CititorDTO cititor)
 {
     readerRepository.InsertObject(CititorTransformer.fromDtoToModel(cititor));
     readerRepository.SaveChanges();
 }