private ItemBundleMappingRepository CreateItemBundleMappingRepository()
        {
            DbContextOptions <ToolShedContext> options;
            var builder = new DbContextOptionsBuilder <ToolShedContext>()
                          .UseInMemoryDatabase(Guid.NewGuid().ToString());

            options = builder.Options;
            var toolshedContext = new ToolShedContext(options);

            toolshedContext.Database.EnsureDeleted();
            toolshedContext.Database.EnsureCreated();

            return(new ItemBundleMappingRepository(toolshedContext));
        }
        private UserAddressesRepository GetInMemoryUserAddressesRepository()
        {
            DbContextOptions <ToolShedContext> options;
            var builder = new DbContextOptionsBuilder <ToolShedContext>()
                          .UseInMemoryDatabase(Guid.NewGuid().ToString());

            options = builder.Options;
            var toolshedContext = new ToolShedContext(options);

            toolshedContext.Database.EnsureDeleted();
            toolshedContext.Database.EnsureCreated();

            return(new UserAddressesRepository(toolshedContext));
        }
Example #3
0
 public UserCartRepository(ToolShedContext toolShedContext)
 {
     this.toolShedContext = toolShedContext;
 }
Example #4
0
 public ItemRentalDetailsRepository(ToolShedContext toolShedContext)
 {
     this.toolShedContext = toolShedContext;
 }
Example #5
0
 public DispenserItemsRepository(ToolShedContext toolShedContext)
 {
     this.toolShedContext = toolShedContext;
 }
Example #6
0
 public OrderDetailsRepository(ToolShedContext toolShedContext)
 {
     this.toolShedContext = toolShedContext;
 }
Example #7
0
 public AddressRepository(ToolShedContext toolShedContext)
 {
     this.toolShedContext = toolShedContext;
 }
 public ItemBundleRepository(ToolShedContext toolShedContext)
 {
     this.toolShedContext = toolShedContext;
 }
Example #9
0
 public MaintenanceProviderRepository(ToolShedContext toolShedContext)
 {
     this.toolShedContext = toolShedContext;
 }
Example #10
0
 public RentalRepository(ToolShedContext toolShedContext)
 {
     this.toolShedContext = toolShedContext;
 }
Example #11
0
 public TenantUserRepository(ToolShedContext toolShedContext)
 {
     this.toolShedContext = toolShedContext;
 }
 public OrderRecordRepository(ToolShedContext toolShedContext)
 {
     this.toolShedContext = toolShedContext ?? throw new ArgumentNullException(nameof(toolShedContext));
 }
 public UserCartItemRentalsRepository(ToolShedContext toolShedContext)
 {
     this.toolShedContext = toolShedContext;
 }
Example #14
0
 public CardRepository(ToolShedContext toolShedContext)
 {
     this.toolShedContext = toolShedContext;
 }
Example #15
0
 public StateSalesTaxRepository(ToolShedContext toolShedContext)
 {
     this.toolShedContext = toolShedContext;
 }
 public ToolsController(ToolShedContext context)
 {
     _context = context;
 }