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

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

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

            return(BadRequest(result.Message));
        }
Example #3
0
        public async Task <IActionResult> GetById(int proposalId)
        {
            var proposal = await _proposalService.GetById(proposalId);

            return(new ObjectResult(proposal));
        }
Example #4
0
 public ProposalModel GetById(int id)
 {
     return(_proposalService.GetById(id));
 }