Beispiel #1
0
        public BakingType randomBakingType()
        {
            Array      values           = Enum.GetValues(typeof(BakingType));
            BakingType randomBakingType = (BakingType)values.GetValue(random.Next(values.Length));

            return(randomBakingType);
        }
Beispiel #2
0
 public Baking GetBakingByType(BakingType type)
 {
     foreach (var baking in context.catalog.products.ToArray())
     {
         if (context.catalog.products[baking.Key].Type == type)
         {
             return(context.catalog.products[baking.Key]);
         }
     }
     throw new Exception("There is no baking of this type");
 }
Beispiel #3
0
 public Baking(int Id, double Price, BakingType Type)
 {
     this.Id    = Id;
     this.Price = Price;
     this.Type  = Type;
 }