示例#1
0
 public string Post([FromBody] Unitalias unitalias)
 {
     //Create
     db.Unitalias.Add(unitalias);
     db.SaveChanges();
     return(JsonConvert.SerializeObject(unitalias));
 }
示例#2
0
 public string Delete([FromBody] Unitalias unitalias)
 {
     db.Unitalias.Remove(unitalias);
     db.SaveChanges();
     return(JsonConvert.SerializeObject("Ok"));
 }
示例#3
0
 public void Put(int id, [FromBody] Unitalias unitalias)
 {
     //Update
     db.Unitalias.Update(unitalias);
     db.SaveChanges();
 }