public async Task <IActionResult> PutNamePatientDetails(int id, NamePatientDetails namePatientDetails)
        {
            if (id != namePatientDetails.Id)
            {
                return(BadRequest());
            }

            _context.Entry(namePatientDetails).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!NamePatientDetailsExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <ActionResult <NamePatientDetails> > PostNamePatientDetails(NamePatientDetails namePatientDetails)
        {
            _context.NamePatientDetails.Add(namePatientDetails);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetNamePatientDetails", new { id = namePatientDetails.Id }, namePatientDetails));
        }