Exemple #1
0
        public IHttpActionResult value(long productId)
        {
            CrossCutting.Raffle.Raffle raffle = new CrossCutting.Raffle.Raffle();

            var result = this._catalogService.GetProduct(productId);

            var value = raffle.value(result);

            return(Ok(value));
        }
Exemple #2
0
        public Product(Domain.Model.Product product)
        {
            CrossCutting.Raffle.Raffle raffle = new CrossCutting.Raffle.Raffle();

            this.Id               = product.Id;
            this.Name             = product.Name;
            this.ShortDescription = product.DescriptionShort;
            this.Description      = product.Description;
            this.Value            = raffle.value(product);
            this.Order            = product.Order;
            this.Images           = new Image().MappingImages(product.Images.ToList());
            this.Category         = new Category(product.Category);
            this.Department       = new Department();
            this.Raffle           = new Raffle(product.Raffles.ToList());
        }