Esempio n. 1
0
 public void Add(FoodPantry foodPantry)
 {
     _context.Add(foodPantry);
     _context.SaveChanges();
 }
Esempio n. 2
0
 public void Update(FoodPantry foodPantry)
 {
     _context.Entry(foodPantry).State = EntityState.Modified;
     _context.SaveChanges();
 }
 public IActionResult FoodPantry(FoodPantry foodPantry)
 {
     _foodPantryRepository.Add(foodPantry);
     return(CreatedAtAction("Get", new { id = foodPantry.Id }, foodPantry));
 }