public void CreateRecipePutsSomethingInTheDatabase() { var repo = new RecipesRepository(_connectionString); repo.Create("Pineapple on a stick", RecipeType.Desserts); var results = repo.GetAllRecipes(); Assert.That(results.Count, Is.EqualTo(1)); }
public IActionResult Create([FromBody] RecipeModel model) { try { var res = _recipesRepository.Create(model); return(Ok(res)); } catch (Exception ex) { _logger.LogError(ex.Message); return(BadRequest()); } }
internal Recipe Create(Recipe newRecipe) { return(_repo.Create(newRecipe)); }
internal Recipe Create(Recipe newRecipe) { _repo.Create(newRecipe); return(newRecipe); }