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