Ejemplo n.º 1
0
        public void UpdateProductDetail(ProductDetail productDetail)
        {
            ProductDetail targetProductDetail = context.ProductDetails.Find(productDetail.ProductID);

            if (targetProductDetail != null)
            {
                targetProductDetail.ImageData = productDetail.ImageData;
                targetProductDetail.ImageMimeType = productDetail.ImageMimeType;
                targetProductDetail.ProductName = productDetail.ProductName;
                targetProductDetail.AboutTheGame = productDetail.AboutTheGame;
                targetProductDetail.AgeRequirement = productDetail.AgeRequirement;
                targetProductDetail.AppID = productDetail.AppID;
                targetProductDetail.AvailableOnLinux = productDetail.AvailableOnLinux;
                targetProductDetail.AvailableOnMac = productDetail.AvailableOnMac;
                targetProductDetail.AvailableOnPC = productDetail.AvailableOnPC;
                targetProductDetail.BaseProductID = productDetail.BaseProductID;
                targetProductDetail.BaseProductName = productDetail.BaseProductName;
                targetProductDetail.CurrencyType = productDetail.CurrencyType;
                targetProductDetail.DemoAppID = productDetail.DemoAppID;
                targetProductDetail.DemoRestrictions = productDetail.DemoRestrictions;
                targetProductDetail.DetailedDescription = productDetail.DetailedDescription;
                targetProductDetail.Developers = productDetail.Developers;
                targetProductDetail.DiscountPercent = productDetail.DiscountPercent;
                targetProductDetail.DLCAppIDs = productDetail.DLCAppIDs;
                targetProductDetail.FinalPrice = productDetail.FinalPrice;
                targetProductDetail.Genres = productDetail.Genres;
                targetProductDetail.HeaderImageURL = productDetail.HeaderImageURL;
                targetProductDetail.InitialPrice = productDetail.InitialPrice;
                targetProductDetail.LinuxMinimumRequirements = productDetail.LinuxMinimumRequirements;
                targetProductDetail.LinuxRecommendedRequirements = productDetail.LinuxRecommendedRequirements;
                targetProductDetail.MacMinimumRequirements = productDetail.MacMinimumRequirements;
                targetProductDetail.MacRecommendedRequirements = productDetail.MacRecommendedRequirements;
                targetProductDetail.MetacriticScore = productDetail.MetacriticScore;
                targetProductDetail.MetacriticURL = productDetail.MetacriticURL;
                targetProductDetail.NumAchievements = productDetail.NumAchievements;
                targetProductDetail.PackageIDs = productDetail.PackageIDs;
                targetProductDetail.PCMinimumRequirements = productDetail.PCMinimumRequirements;
                targetProductDetail.PCRecommendedRequirements = productDetail.PCRecommendedRequirements;
                targetProductDetail.ProductID = productDetail.ProductID;
                targetProductDetail.ProductType = productDetail.ProductType;
                targetProductDetail.ProductWebsite = productDetail.ProductWebsite;
                targetProductDetail.Publishers = productDetail.Publishers;
                targetProductDetail.ReleaseDate = productDetail.ReleaseDate;
                targetProductDetail.SupportedLanguages = productDetail.SupportedLanguages;
                targetProductDetail.TotalRecommendations = productDetail.TotalRecommendations;
                targetProductDetail.Unreleased = productDetail.Unreleased;
            }

            if (productDetail.AppMovies != null)
            {
                foreach (AppMovie movie in productDetail.AppMovies)
                {
                    if (movie.AppMovieID == 0)
                    {
                        InsertAppMovie(movie);
                    }
                    else
                    {
                        UpdateAppMovie(movie);
                    }
                }
            }

            if (productDetail.AppScreenshots != null)
            {
                foreach (AppScreenshot screenshot in productDetail.AppScreenshots)
                {
                    if (screenshot.AppScreenshotID == 0)
                    {
                        InsertAppScreenshot(screenshot);
                    }
                    else
                    {
                        UpdateAppScreenshot(screenshot);
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public void AddProductDetail(ProductDetail productDetail)
 {
     productDetail.Product = this;
     ProductDetail = productDetail;
 }
Ejemplo n.º 3
0
        public void InsertProductDetail(ProductDetail productDetail)
        {
            context.ProductDetails.Add(productDetail);

            if (productDetail.AppMovies != null)
            {
                foreach (AppMovie movie in productDetail.AppMovies)
                {
                    if (movie.AppMovieID == 0)
                    {
                        InsertAppMovie(movie);
                    }
                    else
                    {
                        UpdateAppMovie(movie);
                    }
                }
            }

            if (productDetail.AppScreenshots != null)
            {
                foreach (AppScreenshot screenshot in productDetail.AppScreenshots)
                {
                    if (screenshot.AppScreenshotID == 0)
                    {
                        InsertAppScreenshot(screenshot);
                    }
                    else
                    {
                        UpdateAppScreenshot(screenshot);
                    }
                }
            }
        }
Ejemplo n.º 4
0
        public void BuildProduct(Product product, ProductDetail productDetail)
        {

        }