Esempio n. 1
0
 public ProductsController()
 {
     dbContext = new App_DBEntities();
     prodRepo = new ProductRepository(dbContext);
 }
Esempio n. 2
0
 protected override void Initialize(System.Web.Http.Controllers.HttpControllerContext controllerContext)
 {
     db = new App_DBEntities();
     productRepository = new ProductRepository(db);
     base.Initialize(controllerContext);
 }