//[SwaggerOperation("Post")] //[Produces(typeof(InsertUserResponse))] //[SwaggerResponse(System.Net.HttpStatusCode.OK, Type = typeof(InsertUserResponse))] public IActionResult Post(PizzaPropertiesVM insertPizzaVM) { InsertPizzaResponse insertUserResponse = _pizzaService.InsertPizza(new InsertPizzaRequest() { PizzaProperties = insertPizzaVM }); return(Ok(insertUserResponse)); }
private Pizza AssignAvailablePropertiesToDomain(PizzaPropertiesVM pizzaProperties) { Pizza pizza = new Pizza { Name = pizzaProperties.Name, Price = pizzaProperties.Price, LaunchDate = pizzaProperties.LaunchDate }; Recipe recipe = new Recipe { Ingredients = pizzaProperties.Ingredients, CookingTime = pizzaProperties.CookingTime, Description = pizzaProperties.Description }; pizza.PizzaRecipe = recipe; return(pizza); }