Owneat Technical Guide main Help

Class FormulaSection

Namespace: Restaurant.Domain.Aggregates.FormulaAggregate
Assembly: Restaurant.Domain.dll

public sealed class FormulaSection : Entity

Inheritance

object ← Entity ← FormulaSection

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

FormulaSection\(\)

public FormulaSection()

Properties

ContainedProducts

The list of Restaurant.Domain.Aggregates.ProductAggregate.Product that will be available to chose in the Restaurant.Domain.Aggregates.FormulaAggregate.Formula.

public List<Product> ContainedProducts { get; init; }

Property Value

List < Product \>

Name

The name of the "Category" that will be presented to the customer.

[MaxLength(50)] public string Name { get; set; }

Property Value

string

Methods

AddProduct\(Product\)

Method that add product to a Restaurant.Domain.Aggregates.FormulaAggregate.Formula.

public void AddProduct(Product productToAdd)

Parameters

productToAdd Product

Create\(string\)

public static FormulaSection Create(string name)

Parameters

name string

Returns

FormulaSection

RemoveProduct\(Product\)

Method that remove product from a Restaurant.Domain.Aggregates.FormulaAggregate.FormulaSection.

public void RemoveProduct(Product productToRemove)

Parameters

productToRemove Product

UpdateName\(string\)

Method that update the section name.

public void UpdateName(string newName)

Parameters

newName string

Last modified: 21 May 2024