public async Task <ActionResult <etatDotation> > PostetatDotation(etatDotation etatDotation)
        {
            _context.etatDotations.Add(etatDotation);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetetatDotation", new { id = etatDotation.Id }, etatDotation));
        }
        public async Task <IActionResult> PutetatDotation(int id, etatDotation etatDotation)
        {
            if (id != etatDotation.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }