public Product(ProductCat categorie, string merk, string serie, int typenummer, decimal prijs) { this.categorie = categorie; this.merk = merk; this.serie = serie; this.typenummer = typenummer; this.prijs = prijs; }
public Product(int id, int categorieid, string merk, string serie, int typenummer, decimal prijs) { this.id = id; ProductCatRepository repo = new ProductCatRepository(new ProductCatContext()); this.categorie = repo.GetById(categorieid); this.merk = merk; this.serie = serie; this.typenummer = typenummer; this.prijs = prijs; }