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