public SetMenuAvalabilityCmd(int restaurantId, MenuAgg menuAgg, MenuVisibilityTypes type, String hour = null) { RestaurantId = restaurantId; MenuAgg = menuAgg; MenuVisibilityTypes = type; Hour = hour; }
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; }
public MenuFound(MenuAgg agg) { Agg = agg; }