Пример #1
0
 public ReviewModel(DraftReview draft, bool isDraft)
 {
     this.ID = draft.ID;
     this.ProductModel = new ProductModel(draft.Product);
     this.IdOriginal = draft.OriginReview != null ? draft.OriginReview.ID : 0;
     this.ProductId = this.ProductModel.ID;
     this.ReviewText = draft.ReviewText;
     this.IsDraft = isDraft;
 }
Пример #2
0
 public DraftReview PopularDraftReviewFromModel(DraftReview draft, Product product)
 {
     draft.Product = product;
     draft.ReviewText = this.ReviewText;
     return draft;
 }