private async Task <IActionResult> PutTaskk(int id, Taskk taskk)
        {
            if (id != taskk.id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        private async Task <ActionResult <Taskk> > PostTaskk(Taskk taskk)
        {
            _context.Tasks.Add(taskk);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetTaskk", new { id = taskk.id }, taskk));
        }
        public async Task <IActionResult> PutTaskPom(int id, TaskPom task)
        {
            Taskk pom = new Taskk();

            pom.startDate = DateTime.Now;
            pom.endDate   = DateTime.Now;
            pom.id        = id;
            pom.note      = task.note;
            pom.title     = task.title;
            pom.UserId    = task.UserId;
            Status.Status status = _context.Statuses.SingleOrDefault(x => x.name == task.status);
            pom.StatusId = status.id;
            Priority.Priority priority = _context.Priorities.SingleOrDefault(x => x.name == task.priority);
            pom.PriorityId = priority.id;
            return(await PutTaskk(id, pom));
        }