public async Task <ActionResult <Psychoanalyst> > PostPsychoanalyst(Psychoanalyst psychoanalyst)
        {
            _context.psychoanalysts.Add(psychoanalyst);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetPsychoanalyst", new { id = psychoanalyst.ID }, psychoanalyst));
        }
        public async Task <IActionResult> PutPsychoanalyst(int id, Psychoanalyst psychoanalyst)
        {
            if (id != psychoanalyst.ID)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }