示例#1
0
 public ActionResult <bool> Post([FromBody] Param param)
 {
     if (DAParam.Insert(param, out error))
     {
         return(new CreatedAtRouteResult(null, null, true));
     }
     return(BadRequest(error));
 }
示例#2
0
 public bool Param_Save(Param Item, out LogError logError)
 {
     try
     {
         return(DAParam.Insert(Item, out logError));
     }
     catch (Exception ex)
     {
         myServiceData.Result       = false;
         myServiceData.ErrorMessage = "unforeseen error occured. Please try later.";
         myServiceData.ErrorDetails = ex.ToString();
         throw new FaultException <ServiceData>(myServiceData, ex.ToString());
     }
 }