internal static void AddNewReview(ReviewViewModel newReview)
        {
            //Clean inputs

               Data.Review dbNewReview = CreateDbReview(newReview);

               Data.Accessors.ReviewsAccessor.AddNewReview(dbNewReview);
        }
 private static Data.Review CreateDbReview(ReviewViewModel newReview)
 {
     Data.Review dbNewReview = new Data.Review();
     dbNewReview.ProductId = newReview.ProductId;
     dbNewReview.LengthOfUse = newReview.LengthOfUse;
     dbNewReview.UserId = newReview.User;
     dbNewReview.StarRating = newReview.Rating;
     dbNewReview.Review1 = FormInputHelper.StripInput(newReview.ReviewText);
     return dbNewReview;
 }
 public void AddTrackReview(ReviewViewModel newReview)
 {
     newReview.User = System.Web.HttpContext.Current.User.Identity.Name;
     ReviewHelper.AddNewTrackReview(newReview);
 }
 public void AddReview(ReviewViewModel newReview)
 {
     newReview.User = System.Web.HttpContext.Current.User.Identity.Name;
      ReviewHelper.AddNewReview(newReview);
     //return Json(model, JsonRequestBehavior.AllowGet);
 }
 private static Data.TrackReview CreateDbTrackReview(ReviewViewModel newReview)
 {
     Data.TrackReview dbNewReview = new Data.TrackReview();
     dbNewReview.TrackId = newReview.ProductId;
     dbNewReview.NumberOfVisits = newReview.NumberOfVisits;
     dbNewReview.UserId = newReview.User;
     dbNewReview.StarRating = newReview.Rating;
     dbNewReview.Review = FormInputHelper.StripInput(newReview.ReviewText);
     return dbNewReview;
 }
 internal static void AddNewTrackReview(ReviewViewModel newReview)
 {
     Data.TrackReview dbNewReview = CreateDbTrackReview(newReview);
     Data.Accessors.ReviewsAccessor.AddNewTrackReview(dbNewReview);
 }