Class Ingredient
Namespace: Restaurant.Domain.Aggregates.ProductAggregate
Assembly: Restaurant.Domain.dll
Inheritance
object ← Entity ← Ingredient
Implements
Inherited Members
Entity.Id, Entity.CreatedAt, Entity.UpdatedAt, Entity.DomainEvents, object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)
Constructors
Ingredient\(\)
Properties
Name
Name of the ingredient
Property Value
Product
Restaurant.Domain.Aggregates.ProductAggregate.Ingredient.Product to which is linked the Restaurant.Domain.Aggregates.ProductAggregate.Ingredient.
Property Value
Quantity
Quantity value of the ingredient, has to be put before the unit.
Property Value
Unit
Unit of measure of the ingredient composition. i.e (g, kg, l, ml).
Property Value
Methods
Clone\(\)
Create and return a clone of the Restaurant.Domain.Aggregates.ProductAggregate.Ingredient object which call that method. This method clone the values and not the ID, it is made to clone a menu to edit it after.
Returns
Ingredient
The cloned Restaurant.Domain.Aggregates.ProductAggregate.Ingredient
Create\(string, string, decimal\)
Parameters
name string
unit string
quantity decimal
Returns
Ingredient