public static Bestelling MaakBestelling(Klant klant, Dictionary <Product, int> producten, IDFactory idFactory) { try { return(new Bestelling(idFactory.MaakBestellingID(), klant, DateTime.Now, producten)); } catch (BestellingException ex) { throw new BestellingFactoryException("MaakBestelling", ex); } }
public static Klant MaakKlant(string naam, string adres, List <Bestelling> bestellingen, IDFactory idFactory) { try { return(new Klant(idFactory.MaakKlantID(), naam.Trim(), adres.Trim(), bestellingen)); } catch (KlantException ex) { throw new KlantFactoryException("MaakKlant", ex); } }