Beispiel #1
0
        public async Task <IActionResult> Put(int id, Applicant applicant)
        {
            if (id != applicant.ID)
            {
                return(BadRequest());
            }

            try
            {
                _service.Update(applicant);
            }
            catch (Exception)
            {
                if (!_service.Any(o => o.ID == id))
                {
                    return(NotFound());
                }

                throw;
            }

            return(NoContent());
        }