public async Task <ActionResult <TodoPriorityType> > PostTodoPriorityType(TodoPriorityType todoPriorityType)
        {
            _context.TodoPriorityType.Add(todoPriorityType);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetTodoPriorityType", new { id = todoPriorityType.Id }, todoPriorityType));
        }
        public async Task <IActionResult> PutTodoPriorityType(int id, TodoPriorityType todoPriorityType)
        {
            if (id != todoPriorityType.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }