private void OnSubmit(RecipeViewModelState model)
        {
            var command = new SubmitRecipe {
                Id = new RecipeId(model.RecipeId)
            };

            Bus.Send(command, () => { model.RecipeStatus = RecipeStatus.Submitted; });
        }
        public void When(SubmitRecipe c)
        {
            if (state.RecipeStatus != RecipeStatus.Draft)
            {
                throw new Exception("Cannot submit a recipe that is not in draft mode.");
            }

            Apply(new RecipeSubmitted {
                Id = c.Id
            });
        }
 private void OnSubmit(RecipeViewModelState model)
 {
     var command = new SubmitRecipe { Id = new RecipeId(model.RecipeId) };
     Bus.Send(command, () => { model.RecipeStatus = RecipeStatus.Submitted; });
 }