public getParagraphActionByReview ( int ReviewId ) : IList |
||
ReviewId | int | |
Résultat | IList |
//public int deleteReview(int id) //{ // return DB.Delete().From<Review>().Where(Review.IdColumn).IsEqualTo(id).Execute(); //} public void deleteReview(TblReview r) { r.DeletedDate = DateTime.Now; IReviewRepository reviews = new ReviewRepository(); int reviewID = r.Id; var paragraphs = reviews.getParagraphActionByReview(reviewID); foreach (var paragraphAction in paragraphs) { DB.Delete(paragraphAction); } DB.Save(r); DB.Delete(r); }
//public int deleteReview(int id) //{ // return DB.Delete().From<Review>().Where(Review.IdColumn).IsEqualTo(id).Execute(); //} public void deleteReview(TblReview r) { r.DeletedDate = DateTime.Now; IReviewRepository reviews = new ReviewRepository(); int reviewID = r.Id; var paragraphs = reviews.getParagraphActionByReview(reviewID); foreach (var paragraphAction in paragraphs) { DB.Delete(paragraphAction); } DB.Save(r); DB.Delete(r); }