public HttpResponseMessage Put(int id, [FromBody] TblRestaurante value) { RestauranteDB.Entry(value).State = EntityState.Modified; return(ToJson(RestauranteDB.SaveChanges())); }
public HttpResponseMessage Delete(int id) { RestauranteDB.TblRestaurantes.Remove(RestauranteDB.TblRestaurantes.FirstOrDefault(x => x.Id == id)); return(ToJson(RestauranteDB.SaveChanges())); }
public HttpResponseMessage Post([FromBody] TblRestaurante value) { RestauranteDB.TblRestaurantes.Add(value); return(ToJson(RestauranteDB.SaveChanges())); }