Exemplo n.º 1
0
 public IActionResult Put([FromBody] Loan loan)
 {
     if (loanManager.Update(loan) == 1)
     {
         return(Ok(true));
     }
     else
     {
         return(BadRequest(false));
     }
 }
Exemplo n.º 2
0
        // PUT
        public IHttpActionResult Put(Loans loan)
        {
            try
            {
                var mng = new LoanManager();
                mng.Update(loan);
                apiResp         = new ApiResponse();
                apiResp.Message = "Action was executed.";

                return(Ok(apiResp));
            }
            catch (BusinessException bex)
            {
                return(InternalServerError(new Exception(bex.ExceptionID + "-" + bex.AppMessage.Message)));
            }
        }
Exemplo n.º 3
0
 public void LoanUpdate(Loan loan)
 {
     loanManager.Update(loan);
 }