Class FoodLabel
Namespace: Restaurant.Domain.Aggregates.ProductAggregate
Assembly: Restaurant.Domain.dll
[Table("FoodLabels")]
public sealed class FoodLabel : Entity, IAuditable
Inheritance
object ← Entity ← FoodLabel
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
FoodLabel\(\)
Parameterless constructor.
public FoodLabel()
Properties
Name
Name of the FoodLabel.
[Required]
[MaxLength(200)]
public string Name { get; set; }
Property Value
Products
All products where the foodLabel is present.
[JsonIgnore]
public IEnumerable<Product> Products { get; set; }
Property Value
IEnumerable < Product \>
Methods
Create\(string\)
Method that creates a Restaurant.Domain.Aggregates.ProductAggregate.FoodLabel by passing its name.
public static FoodLabel Create(string name)
Parameters
name string
Name of the Restaurant.Domain.Aggregates.ProductAggregate.FoodLabel.
Returns
FoodLabel
The created Restaurant.Domain.Aggregates.ProductAggregate.FoodLabel.
Last modified: 21 May 2024