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; }
public ItemRepository(ECommerceDBContext context) { _context = context; }
public ProductRepository(ECommerceDBContext dbContext) : base(dbContext) { }
public ProductCategoryRepository(ECommerceDBContext dbContext) { _dbContext = dbContext; }
public UserRepository(ECommerceDBContext dbContext) { UnitOfWork = dbContext; }
public SellerRepository(ECommerceDBContext context) { _context = context; }
public AccountRepository(ECommerceDBContext context) { _context = context; }
public AuthController(ECommerceDBContext context) { _context = context; }
public UserRepository(ECommerceDBContext dbContext) : base(dbContext) { }