Exemple #1
0
 public int PutAzsPlan(int id, [FromBody] AzsPlan value)
 {
     try
     {
         this.ef_plan.Update(value);
         return(this.ef_plan.Save());
     }
     catch (Exception e)
     {
         return(-1);
     }
 }
Exemple #2
0
 public int PostAzsPlan([FromBody] AzsPlan value)
 {
     try
     {
         this.ef_plan.Add(value);
         this.ef_plan.Save();
         return(value.id);
     }
     catch (Exception e)
     {
         return(-1);
     }
 }
Exemple #3
0
 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());
     }
 }