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; }
public DraftReview PopularDraftReviewFromModel(DraftReview draft, Product product) { draft.Product = product; draft.ReviewText = this.ReviewText; return draft; }