public void Put(int id, [FromBody] LoanType loanType) { loanType.id = id; if (ModelState.IsValid) { LoanTypeRepository.Update(loanType); } }