public void Delete(string id)
        {
            var proposal = proposalService.GetById(id);

            proposalService.Delete(proposal);
            proposalService.Save();
        }
        public IActionResult Delete(Proposal proposal)
        {
            var result = _proposalService.Delete(proposal);

            if (result.Success)
            {
                return(Ok(result.Message));
            }

            return(BadRequest(result.Message));
        }
        public IActionResult Delete(int id)
        {
            var model = _proposalService.Delete(id);

            if (model)
            {
                return(Ok(model));
            }
            else
            {
                return(BadRequest("This proposal not exist"));
            }
        }
        public ServiceResult DeleteProposal([FromServices] IProposalService proposalService, int id)
        {
            var result = proposalService.Delete(id);

            return(result);
        }
Esempio n. 5
0
        public ActionResult Delete(int id)
        {
            _proposalService.Delete(id);

            return(Ok(new { message = "Proposta exclu�da com sucesso" }));
        }