public async Task <HttpResponseMessage> DeleteProduct(Int32 id) { var response = new SingleModelResponse <Product>() as ISingleModelResponse <Product>; try { var entity = await Task.Run(() => { return(BusinessObject.DeleteProduct(new Product(id))); }); response.Model = entity; } catch (Exception ex) { ExceptionHelper.Publish(ex); response.DidError = true; response.ErrorMessage = ex.Message; } return(response.ToHttpResponse(Request)); }