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