public string Post([FromBody] string value)
 {
     try
     {
         var customer = value.ToObject <CustomerModel>();
         var retVal   = QCallerDBUpdate.UpdateCustomer(customer);
         return(retVal.ToJsonString());
     }
     catch (Exception e)
     {
         return(new IntegerReturnValue()
         {
             Description = $"Failed to UpdateCustomer: {e.Message}",
             Result = -1
         }.ToJsonString());
     }
 }
Ejemplo n.º 2
0
 public string Post([FromBody] string value)
 {
     try
     {
         var restaurant = value.ToObject <RestaurantModel>();
         var retVal     = QCallerDBUpdate.UpdateRestaurant(restaurant);
         return(retVal.ToJsonString());
     }
     catch (Exception e)
     {
         return(new IntegerReturnValue()
         {
             Description = $"Error: {e.Message}",
             Result = -1
         }.ToJsonString());
     }
 }