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