public int PutAzsPlan(int id, [FromBody] AzsPlan value) { try { this.ef_plan.Update(value); return(this.ef_plan.Save()); } catch (Exception e) { return(-1); } }
public int PostAzsPlan([FromBody] AzsPlan value) { try { this.ef_plan.Add(value); this.ef_plan.Save(); return(value.id); } catch (Exception e) { return(-1); } }
public IHttpActionResult GetAzsPlan(int id) { try { AzsPlan plan = this.ef_plan.Get(id); if (plan == null) { return(NotFound()); } return(Ok(plan)); } catch (Exception e) { return(NotFound()); } }