Example #1
0
        internal InnoloftDBContext context()
        {
            var options = new DbContextOptionsBuilder <InnoloftDBContext>()
                          .UseLazyLoadingProxies()
                          .UseSqlite("Data Source=Innoloft.db;");
            var context = new InnoloftDBContext(options.Options);

            return(context);
        }
 public ProductController(IMapper mapper, InnoloftDBContext context)
 {
     _mapper         = mapper;
     _productService = new ProductService(context);
 }
Example #3
0
 public ProductService(InnoloftDBContext context)
 {
     _productRepository     = new EFRepository <Product>(context);
     _productTypeRepository = new EFRepository <ProductType>(context);
 }
Example #4
0
 public SeedController(InnoloftDBContext context)
 {
     _seedService = new SeedService(context);
 }
Example #5
0
 public SeedService(InnoloftDBContext context)
 {
     _context = context;
     _productTypeRepository = new EFRepository <ProductType>(context);
     _contactRepository     = new EFRepository <Contact>(context);
 }