示例#1
0
 public HttpResponseMessage Put(int id, [FromBody] User value)
 {
     EcommunicationDB.Entry(value).State = EntityState.Modified;
     return(ToJson(EcommunicationDB.SaveChanges()));
 }
示例#2
0
 public HttpResponseMessage Delete(int id)
 {
     EcommunicationDB.Users.Remove(EcommunicationDB.Users.FirstOrDefault(x => x.UserId == id));
     return(ToJson(EcommunicationDB.SaveChanges()));
 }
示例#3
0
 public HttpResponseMessage Post([FromBody] User value)
 {
     EcommunicationDB.Users.Add(value);
     return(ToJson(EcommunicationDB.SaveChanges()));
 }