public bool CreateMeditationReview(SapReviewMeditation meditationReview) { using (var dbConn = new SapremaFinalContext()) { meditationReview.ReviewMeditationId = Guid.NewGuid(); dbConn.SapReviewMeditation.Add(meditationReview); dbConn.SaveChanges(); return(true); } }
//Add meditation review to db public bool CreateMeditationReview(string userId, Guid meditationId, decimal reviewStars, string reviewComment) { using (var dbConn = new SapremaFinalContext()) { SapReviewMeditation sapReviewMeditation = new SapReviewMeditation() { UserId = userId, MeditationId = meditationId, ReviewStars = reviewStars, ReviewComment = reviewComment, //ReviewmeditationKey = Guid.NewGuid() }; dbConn.SapReviewMeditation.Add(sapReviewMeditation); dbConn.SaveChanges(); }; return(true); }