Exemple #1
0
        public async Task <IActionResult> Put([FromBody] Cheque value, [FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != value.ChequeId)
            {
                return(BadRequest());
            }

            await _chequeRepository.UpdateAsync(value);

            return(Ok(value));
        }