Exemplo n.º 1
0
 /// <summary>
 /// Delete method for Housing Complex
 /// </summary>
 /// <param name="complex"></param>
 /// <returns></returns>
 public async Task <HttpResponseMessage> Delete([FromBody] HousingComplexDto complex)
 {
     try
     {
         if (await logicHelper.DeleteComplex(complex))
         {
             var Response1 = Request.CreateResponse(HttpStatusCode.OK, "successfully delete");
             log.Info("HousingComplex Delete Successful");
             return(Response1);
         }
         var Response2 = Request.CreateResponse(HttpStatusCode.BadRequest, "failed to delete");
         log.Info("HousingComplex Delete Unsuccessful");
         return(Response2);
     }
     catch (Exception ex)
     {
         LogHelper.SendError(log, ex);
         return(Request.CreateResponse(HttpStatusCode.BadRequest));
     }
 }