/// <summary> /// Update a product's fields with this fields values /// </summary> /// <returns></returns> public void UpdateProduct(auRant.Core.Entities.Product produtoEditavel, ProductCategory category, PublicationStatus productStatus, Supplier supplier) { produtoEditavel.Name = this.Name; produtoEditavel.Category = category; produtoEditavel.PublicationStatus = productStatus; produtoEditavel.Price = this.Price; produtoEditavel.Supplier = supplier; produtoEditavel.urlImage = this.urlImage; produtoEditavel.ShortDescription = this.ShortDescription; produtoEditavel.FullDescription = this.FullDescription; }
/// <summary> /// Transforms itself into a Product entity /// </summary> /// <returns></returns> public auRant.Core.Entities.Product CreateProduct(string urlImage, ProductCategory category, PublicationStatus productStatus, Supplier supplier) { return new auRant.Core.Entities.Product() { Name = this.Name, Category = category, PublicationStatus = productStatus, Price = this.Price, Supplier = supplier, urlImage = urlImage, ShortDescription = this.ShortDescription, FullDescription = this.FullDescription }; }
public DraftProduct PopularDraftReviewFromModel(DraftProduct draft, ProductCategory category, Supplier supplier, Product origin) { draft.OriginalProduct = origin; draft.Category = category; draft.Supplier = supplier; draft.Name = this.Name; draft.Price = this.Price; draft.ShortDescription = this.ShortDescription; draft.urlImage = this.urlImage; draft.FullDescription = this.FullDescription; return draft; }
public DraftProduct CreateDraftReviewFromModel(ProductCategory category, Supplier suplier, Product origin) { return new DraftProduct() { Category = category, FullDescription = this.FullDescription, Supplier = suplier, Name = this.Name, Price = this.Price, ShortDescription = this.ShortDescription, urlImage = this.urlImage, OriginalProduct = origin }; }