示例#1
0
        public void UpdateLoan(ImprumutDTO imprumut)
        {
            Imprumut model = loanRepository.GetObjectById(imprumut.imprumutId);

            model.dataRestituire = imprumut.dataRestituire;
            loanRepository.DeleteObject(imprumut.imprumutId);
            loanRepository.InsertObject(model);
            loanRepository.SaveChanges();
        }
示例#2
0
        public void AddReviewForLoan(ImprumutDTO imprumut, string text)
        {
            Review review = new Review()
            {
                imprumutId = imprumut.imprumutId,
                text       = text
            };

            reviewRepository.InsertObject(review);
            reviewRepository.SaveChanges();
        }