public Task <HttpResponseMessage> Delete(int id)
        {
            var command = new DeleteProductCommand(id: id);

            var product = _service.Delete(command);

            return(CreateResponse(HttpStatusCode.OK, product));
        }
Esempio n. 2
0
 public IActionResult Delete(Guid id)
 {
     try
     {
         _productApplicationService.Delete(id);
         return(Ok());
     }
     catch (Exception)
     {
         return(BadRequest());
     }
 }
        public Task <HttpResponseMessage> Delete(int id)
        {
            var product = _service.Delete(id);

            return(CreateResponse(HttpStatusCode.OK, product));
        }
Esempio n. 4
0
        public async Task <IActionResult> Delete([FromQuery] ProductModelRequest request)
        {
            ResultResponse result = await _productApplicationService.Delete(request);

            return(Response(result));
        }