/// <summary>
 /// Create a new Review object.
 /// </summary>
 /// <param name="reviewId">Initial value of the ReviewId property.</param>
 /// <param name="creationDateTime">Initial value of the CreationDateTime property.</param>
 /// <param name="profileId">Initial value of the ProfileId property.</param>
 /// <param name="description">Initial value of the Description property.</param>
 /// <param name="state">Initial value of the State property.</param>
 /// <param name="title">Initial value of the Title property.</param>
 public static Review CreateReview(global::System.Int32 reviewId, global::System.DateTime creationDateTime, global::System.Int32 profileId, global::System.String description, global::System.Int16 state, global::System.String title)
 {
     Review review = new Review();
     review.ReviewId = reviewId;
     review.CreationDateTime = creationDateTime;
     review.ProfileId = profileId;
     review.Description = description;
     review.State = state;
     review.Title = title;
     return review;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Reviews EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToReviews(Review review)
 {
     base.AddObject("Reviews", review);
 }
 private void DeletePictures(Review review)
 {
     var tempPictures = review.Pictures.Select(x => new { Id = x.PictureId, Path = x.Path, FileName = x.FileName }).ToList();
     foreach (var pic in tempPictures)
     {
         PictureService.Delete(pic.Path, pic.FileName);
         PictureRepository.Delete(pic.Id);
     }
 }