Exemplo n.º 1
0
        public async Task <IActionResult> DeleteCompra(long id)
        {
            try
            {
                var result = await service.DeleteCompra(id);

                return(CreatedAtAction("DeleteCompra", new { id = result.IdCompra }, result));
            }
            catch (Exception e)
            {
                var err = e.Message;
                return(BadRequest(new { msg = err }));
            }
        }