// For injection
 public PurchasesController(SupplierProductRepository ctx)
 {
     context = ctx;
 }
 public PurchasesController()
 {
     this.repository = new SupplierProductRepository();
 }
        //private MapperConfiguration supConfig, prodConfig;

        public PurchasesController()
        {
            context = new SupplierProductRepository(new ProductDbContext());
            //prodConfig = new MapperConfiguration(cfg => cfg.CreateMap<Product, ProductDTO>());
            //supConfig = new MapperConfiguration(cfg => cfg.CreateMap<Supplier, SupplierDTO>());
        }