private void InitializeUser()
        {
            try
            {
                _context.Entry(user).State = EntityState.Detached;
            }
            catch (Exception)
            {
                // TODO: nothing...
            }

            user = new TestWizardsUser()
            {
                UserId                   = 26,
                UserName                 = "******",
                PasswordHash             = "Password1!",
                FirstName                = "Test",
                Dob                      = Convert.ToDateTime("2010-10-25"),
                LastName                 = "Customer",
                Phone                    = "5197214013",
                Email                    = "*****@*****.**",
                Gender                   = "Female",
                ReceivePromotionalEmails = true
            };
        }
        private void InitializeFavoriteCategory()
        {
            try
            {
                _context.Entry(favoriteCategory).State = EntityState.Detached;
            }
            catch (Exception)
            {
                // TODO: nothing...
            }

            favoriteCategory = new FavoriteCategory()
            {
                UserId         = 26,
                GameCategoryId = 1
            };
        }
        private void InitializeFavoritePlatform()
        {
            try
            {
                _context.Entry(favoritePlatform).State = EntityState.Detached;
            }
            catch (Exception)
            {
                // TODO: nothing...
            }

            favoritePlatform = new FavoritePlatform()
            {
                UserId     = 26,
                PlatformId = 1
            };
        }
        private void InitializeRating()
        {
            try
            {
                _context.Entry(rating).State = EntityState.Detached;
            }
            catch (Exception)
            {
                // TODO: nothing...
            }

            rating = new Rating()
            {
                Rate   = 3,
                UserId = 26,
                GameId = 1
            };
        }
Exemple #5
0
        private void InitializeRelationship()
        {
            try
            {
                _context.Entry(relationship).State = EntityState.Detached;
            }
            catch (Exception)
            {
                // TODO: nothing...
            }

            relationship = new Relationship()
            {
                Sender     = 26,
                Receiver   = 27,
                IsAccepted = true,
                IsFamily   = false
            };
        }
Exemple #6
0
        private void InitializeOrderDetail()
        {
            try
            {
                _context.Entry(orderDetail).State = EntityState.Detached;
            }
            catch (Exception)
            {
                // TODO: nothing...
            }

            orderDetail = new OrderDetail()
            {
                OrderId   = 1,
                GameId    = 1,
                Quantity  = 2,
                IsDigital = false
            };
        }
        private void InitializeReview()
        {
            try
            {
                _context.Entry(review).State = EntityState.Detached;
            }
            catch (Exception)
            {
                // TODO: nothing...
            }

            review = new Review()
            {
                ReviewId      = 1,
                UserId        = 26,
                GameId        = 1,
                ReviewContent = "Good game.",
                ReviewDate    = System.DateTime.Now,
                IsPublished   = true
            };
        }
        private void InitializeCreditCard()
        {
            try
            {
                _context.Entry(creditCard).State = EntityState.Detached;
            }
            catch (Exception)
            {
                // TODO: nothing...
            }

            creditCard = new TestCreditCard()
            {
                CreditCardId     = 75,
                UserId           = 99,
                CreditCardNumber = "5610591081018250",
                ExpiryDate       = "1021",
                CardHolder       = "Testing User",
                Cvc = "123"
            };
        }
Exemple #9
0
        private void InitializeOrder()
        {
            try
            {
                _context.Entry(order).State = EntityState.Detached;
            }
            catch (Exception)
            {
                // TODO: nothing...
            }

            order = new WizardsOrder()
            {
                OrderId           = 1,
                UserId            = 26,
                Total             = 117m,
                CreditCardId      = 18,
                MailingAddressId  = 20,
                ShippingAddressId = 21,
                OrderStatusId     = 1
            };
        }
        private void InitializeAddress()
        {
            try
            {
                _context.Entry(address).State = EntityState.Detached;
            }
            catch (Exception)
            {
                // TODO: nothing...
            }

            address = new TestAddress()
            {
                AddressId     = 100,
                UserId        = 99,
                Street1       = "123 King Street",
                Street2       = "",
                City          = "Waterloo",
                ProvinceCode  = "ON",
                PostalCode    = "N2A 2K5",
                AddressTypeId = 3
            };
        }
        private void InitializeGame()
        {
            try
            {
                _context.Entry(game).State = EntityState.Detached;
            }
            catch (Exception)
            {
                // TODO: nothing...
            }

            game = new TestGame()
            {
                GameId          = 200,
                GameStatusCode  = "A",
                GameCategoryId  = 1,
                GamePlatformId  = 1,
                GameName        = "Testing Game",
                GameDescription = "Testing description for Testing Game",
                GamePrice       = 9.99m,
                GameQty         = 100,
                GameDigitalPath = @"\download\200"
            };
        }