public bool Update(int id, ApproveVM approveVM)
 {
     if (string.IsNullOrWhiteSpace(id.ToString()) || string.IsNullOrWhiteSpace(approveVM.Name))
     {
         return(status);
     }
     else
     {
         var result = _approveRepository.Update(id, approveVM);
         return(result);
     }
 }
Exemple #2
0
 public async Task <IActionResult> UpdateApproval([FromBody] Approval approval) //we are expecting http request and inside of request we expect product body and .net core will auto convert jason to object
 {
     return(Ok(await _repository.Update(approval)));
 }