public Product(IProductRepository repository, Shopper shopper, string name, string supplier, List <Unit> units, bool active = true) : this()
        {
            ProductVersion firstProductVersion = MakeFirstProductVersion(name, supplier, units, active);

            this.Name = name;
            //-1 indicating it is null.
            this.DeletedByID = -1;
            this.CreatedByID = shopper.GetID();
            this.DateCreated = DateTime.Now;
            this.ProductVersions.Add(firstProductVersion);

            //Contains the methods needed to update the database
            this.repository = repository;
            this.repository.AddProduct(this);
        }
 public Product(Shopper shopper, string name, string supplier, List <Unit> units, bool active = true)
     : this(new ProductRepository(), shopper, name, supplier, units, active)
 {
 }