コード例 #1
0
 public void Alterar(PratosIngredientes PratosIngredientes)
 {
     using (var contexto = new Contexto())
     {
         contexto.PratosIngredientes.Update(PratosIngredientes);
         contexto.SaveChanges();
     }
 }
コード例 #2
0
 public void Incluir(PratosIngredientes PratosIngredientes)
 {
     using (var contexto = new Contexto())
     {
         contexto.PratosIngredientes.Add(PratosIngredientes);
         contexto.SaveChanges();
     }
 }
コード例 #3
0
 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());
 }
コード例 #5
0
 public PratosIngredientes Put([FromBody] PratosIngredientes pratosIngredientes)
 {
     _repo.Alterar(pratosIngredientes);
     return(pratosIngredientes);
 }
コード例 #6
0
 public PratosIngredientes Post([FromBody] PratosIngredientes pratosIngredientes)
 {
     _repo.Incluir(pratosIngredientes);
     return(pratosIngredientes);
 }