private IngredientCommand CreateIngredientCommand(IngredientCreateRequest ingredientRequest) { var ingredientCommand = new IngredientCommand { Id = m_idGenerator.GenerateId(), Name = ingredientRequest.Name, Description = ingredientRequest.Description }; return(ingredientCommand); }
public async Task <IngredientResult> PostIngredient(IngredientCreateRequest ingredientRequest) { var ingredientCommand = CreateIngredientCommand(ingredientRequest); await m_commandExecutor.ExecuteAsync(ingredientCommand); var postedIngredient = await FindIngredient(ingredientCommand.Id); return(postedIngredient); }