예제 #1
0
        public void SetUp()
        {
            _builder = new DbContextOptionsBuilder <ECommerceDBContext>().EnableSensitiveDataLogging().UseInMemoryDatabase(Guid.NewGuid().ToString());
            ECommerceDBContext sellerContext = new ECommerceDBContext(_builder.Options);

            itemRepository = new ItemRepository(sellerContext);
            sellerContext.Items.Add(new Items {
                Itemid = 1, Itemname = "lg", Price = "10000", Description = "tv", Stockno = 123, Remarks = "good", Sellerid = 1
            });
            sellerContext.SaveChanges();
        }
        public void SetUp()
        {
            _builder = new DbContextOptionsBuilder <ECommerceDBContext>().EnableSensitiveDataLogging().UseInMemoryDatabase(Guid.NewGuid().ToString());
            ECommerceDBContext eCommerceDBContext = new ECommerceDBContext(_builder.Options);

            AccountRepository = new AccountRepository(eCommerceDBContext);
            eCommerceDBContext.Seller.Add(new Seller {
                Sellerid = 700, Username = "******", Password = "******", Companyname = "infosys", Gst = 47, Aboutcmpy = "gud", Address = "bangalore", Website = "www.infy.com", Email = "*****@*****.**", Mobileno = "9535678900"
            });
            eCommerceDBContext.SaveChanges();
        }
 public ProductAttributeRepository(ECommerceDBContext dbContext)
 {
     _dbContext = dbContext;
 }
 public CategoryRepository(ECommerceDBContext dbContext, ApplicationSettings applicationSettings)
 {
     UnitOfWork = dbContext;
     this.applicationSettings = applicationSettings;
 }
 public AttributesLookupRepository(ECommerceDBContext dbContext)
 {
     _dbContext = dbContext;
 }
예제 #6
0
 public ItemRepository(ECommerceDBContext context)
 {
     _context = context;
 }
예제 #7
0
 public ProductRepository(ECommerceDBContext dbContext)
     : base(dbContext)
 {
 }
예제 #8
0
 public ProductCategoryRepository(ECommerceDBContext dbContext)
 {
     _dbContext = dbContext;
 }
예제 #9
0
 public UserRepository(ECommerceDBContext dbContext)
 {
     UnitOfWork = dbContext;
 }
 public SellerRepository(ECommerceDBContext context)
 {
     _context = context;
 }
 public AccountRepository(ECommerceDBContext context)
 {
     _context = context;
 }
예제 #12
0
 public AuthController(ECommerceDBContext context)
 {
     _context = context;
 }
예제 #13
0
 public UserRepository(ECommerceDBContext dbContext)
     : base(dbContext)
 {
 }