public void Initialize() { this.userProfile = FakeEntityFactory.CreateUserProfile(); this.person = FakeEntityFactory.CreatePerson(); this.seller = FakeEntityFactory.CreateSeller(); this.auction = FakeEntityFactory.CreateAuction(); this.bidder = FakeEntityFactory.CreateBidder(); this.product = FakeEntityFactory.CreateProduct(); this.category = FakeEntityFactory.CreateCategory(); this.userProfileServices = new UserProfileService(new UserProfileRepository()); this.personServices = new PersonService(new PersonRepository()); this.bidderServices = new BidderService(new BidderRepository()); this.sellerServices = new SellerService(new SellerRepository()); this.categoryServices = new CategoryService(new CategoryRepository()); this.bidServices = new BidService(new BidRepository()); this.productServices = new ProductService(new ProductRepository()); this.auctionServices = new AuctionService(new AuctionRepository()); using (var auctionDBContext = new AuctionDBContext()) { auctionDBContext.Database.Delete(); } }