public void UpdateRecipe(WhatYouGotLibrary.Models.Recipe recipe)
        {
            Entities.Recipe currentRecipe = _context.Recipe.Find(recipe.Id);
            Entities.Recipe newRecipe     = Mapper.Map(recipe);

            _context.Entry(currentRecipe).CurrentValues.SetValues(newRecipe);
        }
 public static Entities.Recipe Map(WhatYouGotLibrary.Models.Recipe recipe)
 {
     return(new Entities.Recipe
     {
         Id = recipe.Id,
         Title = recipe.Title,
         ImageUrl = recipe.ImageUrl
     });
 }
 public void AddRecipe(WhatYouGotLibrary.Models.Recipe recipe)
 {
     Entities.Recipe newRecipe = Mapper.Map(recipe);
     _context.Add(newRecipe);
 }