public void Alterar(PratosIngredientes PratosIngredientes) { using (var contexto = new Contexto()) { contexto.PratosIngredientes.Update(PratosIngredientes); contexto.SaveChanges(); } }
public void Incluir(PratosIngredientes PratosIngredientes) { using (var contexto = new Contexto()) { contexto.PratosIngredientes.Add(PratosIngredientes); contexto.SaveChanges(); } }
public IEnumerable <PratosIngredientes> Put([FromBody] PratosIngredientes pratosIngredientes) { _repo.Alterar(pratosIngredientes); return(_repo.SelecionarTodos()); }
public IEnumerable <PratosIngredientes> Post([FromBody] PratosIngredientes pratosIngredientes) { _repo.Incluir(pratosIngredientes); return(_repo.RetornarTodos()); }
public PratosIngredientes Put([FromBody] PratosIngredientes pratosIngredientes) { _repo.Alterar(pratosIngredientes); return(pratosIngredientes); }
public PratosIngredientes Post([FromBody] PratosIngredientes pratosIngredientes) { _repo.Incluir(pratosIngredientes); return(pratosIngredientes); }