public void DeleteSongReview(int songReviewId) { using (var uow = UnitOfWorkProvider.Create()) { _songReviewRepository.Delete(songReviewId); uow.Commit(); } }
/// <summary> /// Deletes the review /// </summary> /// <param name="reviewID">ID of review to delete</param> public void DeleteSongReview(int reviewID) { if (reviewID < 1) { throw new ArgumentOutOfRangeException("Song review service - DeleteReview(...) the reviewID cannot be lesser than 1"); } using (var uow = UnitOfWorkProvider.Create()) { var review = songReviewRepository.GetByID(reviewID); if (review == null) { throw new NullReferenceException("Song review service - DeleteReview(...) the review to be deleted is null"); } songReviewRepository.Delete(review); uow.Commit(); } }