Esempio n. 1
0
 public void Put(int id, [FromBody] Sbtest1 value)
 {
     if (value.id != id)
     {
         throw new Exception("id not equeal");
     }
     myDbContext.Sbtest1.Update(value);
 }
 public void Put(int id, [FromBody] Sbtest1 value)
 {
     if (value.Id != id)
     {
         throw new Exception("id not equeal");
     }
     context.Sbtest1.Update(value);
     context.SaveChanges();
 }
Esempio n. 3
0
 public void Post([FromBody] Sbtest1 value)
 {
     myDbContext.Sbtest1.Add(value);
 }