Ejemplo n.º 1
0
 // DELETE api/<controller>/5
 public async System.Threading.Tasks.Task <IHttpActionResult> DeleteLotPhotoAsync(int id)
 {
     try
     {
         await lotPhotosOperationsHandler.DeletePhotoAsync(id, System.Web.Hosting.HostingEnvironment.MapPath(@"~"), Request.RequestUri.GetLeftPart(UriPartial.Authority));
     }
     catch (WrongIdException ex)
     {
         return(Content(HttpStatusCode.NotFound, ex.Message));
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
     return(Ok());
 }