public SetMenuAvalabilityCmd(int restaurantId, MenuAgg menuAgg, MenuVisibilityTypes type, String hour = null)
 {
     RestaurantId        = restaurantId;
     MenuAgg             = menuAgg;
     MenuVisibilityTypes = type;
     Hour = hour;
 }
Exemplo n.º 2
0
        public override Task <ICreateMenuResult> Work(CreateMenuCmd Op, Unit state)
        {
            Menu newMenu = new Menu()
            {
                Name = Op.MenuName, RestaurantId = Op.Restaurant.Id
            };
            //if (Exists(Op.Restaurant, newMenu))
            //{
            //    return Task.FromResult<ICreateMenuResult>(new MenuNotCreated("This menu already exists!"));
            //}
            //else
            //{
            MenuAgg newMenuAgg = new MenuAgg(newMenu);

            return(Task.FromResult <ICreateMenuResult>(new MenuCreated(newMenuAgg)));
            //}
        }
 public MenuCreated(MenuAgg menu)
 {
     Menu = menu;
 }
 public MenuSelected(MenuAgg menu)
 {
     MenuAgg = menu;
 }
Exemplo n.º 5
0
 public MenuFound(MenuAgg agg)
 {
     Agg = agg;
 }