Class Menu
Namespace: Restaurant.Domain.Aggregates.MenuAggregate
Assembly: Restaurant.Domain.dll
Inheritance
object ← Entity ← Menu
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
Menu\(\)
Properties
Categories
This Restaurant.Domain.Aggregates.MenuAggregate.Menu.Categories field represents all the Restaurant.Domain.Aggregates.CategoryAggregate.Category contained in the menu.
Property Value
IEnumerable < Category \>
Name
The name of the menu : i.e "Evening menu, afternoon menu".
Property Value
RestaurantId
Restaurant.Domain.Aggregates.MenuAggregate.Menu.RestaurantId of the restaurant that contains the Restaurant.Domain.Aggregates.MenuAggregate.Menu.
Property Value
SortingIndex
Position of the Restaurant.Domain.Aggregates.MenuAggregate.Menu in it's Restaurant.
Property Value
States
This Restaurant.Domain.Aggregates.MenuAggregate.Menu.States field represents the actual state of the menu. By default a menu is drafted.
Property Value
Methods
Clone\(\)
Create and return a clone of the Restaurant.Domain.Aggregates.MenuAggregate.Menu 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. This method uses a builder pattern giving responsibility to each Common.Primitives.Entity to clone itself.
Returns
Menu
The cloned Restaurant.Domain.Aggregates.MenuAggregate.Menu
Create\(string\)
Parameters
name string
Returns
Menu
InsertCategory\(string, ServingPeriod, bool\)
Add a sub Restaurant.Domain.Aggregates.CategoryAggregate.Category on the Restaurant.Domain.Aggregates.MenuAggregate.Menu
Parameters
name string
period ServingPeriod
isFormulaSpecific bool
IsActive\(\)
Check if menu is active.
Returns
RemoveCategory\(Category\)
Remove a sub Restaurant.Domain.Aggregates.CategoryAggregate.Category from the Restaurant.Domain.Aggregates.MenuAggregate.Menu
Parameters
category Category
SetState\(MenuStates\)
Set the Restaurant.Domain.Aggregates.MenuAggregate.Assets.MenuStates of the Restaurant.Domain.Aggregates.MenuAggregate.Menu
Parameters
states MenuStates
UpdateSortingIndex\(int\)
Update the position of the Restaurant.Domain.Aggregates.MenuAggregate.Menu in its Restaurant.
Parameters
newSortingIndex int
New position.