Exemple #1
0
 public ActionResult <Pais> Put(int id, [FromBody] Pais pais)
 {
     if (id != pais.Id)
     {
         return(BadRequest());
     }
     context.Entry(pais).State = EntityState.Modified;
     context.SaveChanges();
     return(Ok());
 }
Exemple #2
0
        public ActionResult <Provincia> Put(int id, [FromBody] Provincia provincia)
        {
            if (id != provincia.Id)
            {
                return(BadRequest());
            }

            context.Entry(provincia).State = EntityState.Modified;
            context.SaveChanges();
            return(Ok());
        }