Esempio n. 1
0
        public void Startup()
        {
            var dataContext = new LinqTestDataContext();
            _productRepository = new SqlProductRepository(dataContext);
            _categoryRepository = new SqlCategoryRepository(dataContext);

            _productService = new ProductService(_productRepository);
            _categoryService = new CategoryService(_categoryRepository);
        }
 public SqlProductRepository(LinqTestDataContext dataContext)
 {
     _db = dataContext;
 }
 public SqlCategoryRepository(LinqTestDataContext dataContext)
 {
     _db = dataContext;
 }