public void UpdateLoan(ImprumutDTO imprumut) { Imprumut model = loanRepository.GetObjectById(imprumut.imprumutId); model.dataRestituire = imprumut.dataRestituire; loanRepository.DeleteObject(imprumut.imprumutId); loanRepository.InsertObject(model); loanRepository.SaveChanges(); }
public void AddReviewForLoan(ImprumutDTO imprumut, string text) { Review review = new Review() { imprumutId = imprumut.imprumutId, text = text }; reviewRepository.InsertObject(review); reviewRepository.SaveChanges(); }