Beispiel #1
0
        public Producto(Guid id, string nombre, string precio, string cantidad)
        {
            CheckRule(new NotNullRule <ProductoNameValue>(nombre));
            CheckRule(new NotNullRule <PrecioNumberValue>(precio));
            CheckRule(new NotNullRule <CantidadNumberValue>(cantidad));

            Id       = id;
            Nombre   = nombre;
            Precio   = precio;
            Cantidad = cantidad;
        }
Beispiel #2
0
 public void ActualizarCantidad(string cantidadPedidad)
 {
     Cantidad = cantidadPedidad;
 }