Class Category
Namespace: Restaurant.Domain.Aggregates.CategoryAggregate
Assembly: Restaurant.Domain.dll
Inheritance
object ← Entity ← Category
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
Category\(\)
Properties
Formulas
Property Value
IEnumerable < Formula \>
IsFormulaSpecific
Property Value
MenuId
Property Value
Name
Property Value
Period
Property Value
Products
Property Value
IEnumerable < Product \>
RestaurantId
Property Value
SortingIndex
Position of the inherit element in it's parent.
Property Value
Methods
Clone\(\)
Create and return a clone of the Restaurant.Domain.Aggregates.CategoryAggregate.Category 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
Category
The cloned Restaurant.Domain.Aggregates.CategoryAggregate.Category
Create\(string, Guid, ServingPeriod, bool\)
Parameters
name string
restaurantId Guid
period ServingPeriod
isFormulaSpecific bool
Returns
Category
GetAllFormulas\(\)
Returns
IEnumerable < Formula \>
GetAllProducts\(\)
Returns
IEnumerable < Product \>
InsertNewFormula\(Formula\)
Parameters
formula Formula
InsertNewProduct\(string, string, string, double, VatRate, Guid\)
Parameters
name string
description string
displayImageUrl string
price double
vatRate VatRate
restaurantGuid Guid
Returns
RemoveFormula\(Formula\)
Remove a Restaurant.Domain.Aggregates.FormulaAggregate.Formula from a Restaurant.Domain.Aggregates.CategoryAggregate.Category.
Parameters
formula Formula
RemoveProduct\(Product\)
Remove a Restaurant.Domain.Aggregates.ProductAggregate.Product from a Restaurant.Domain.Aggregates.CategoryAggregate.Category.
Parameters
product Product
Rename\(string\)
Parameters
newName string
UpdateSortingIndex\(int\)
Update the position of the Restaurant.Domain.Aggregates.CategoryAggregate.Category in its Menu.
Parameters
newSortingIndex int
New position.