// Get the Dish for Time Of Day with Dish Type public Dish GetDish(DishConstant.TimeOfDay timeOfDay, DishConstant.DishType dishType) { if (dishes != null) { var dish = dishes.DishList.FirstOrDefault(x => x.dishType == dishType && x.TimeOfDay == timeOfDay); if (dish == null) { dish = new Dish(); dish.dishName = "error"; } return dish; } var dish1 = new Dish(); dish1.dishName = "error"; return dish1; }
public string GetDish(DishConstant.TimeOfDay timeOfDay, DishConstant.DishType dishType) { var dishService = new DishService(); return dishService.GetDish(timeOfDay, dishType).dishName; }
public Dish(DishConstant.DishType dishType, DishConstant.TimeOfDay timeOfDay, string dishName) { this.dishType = dishType; this.TimeOfDay = timeOfDay; this.dishName = dishName; }