Exemplo n.º 1
0
        private void AddTask()
        {
            var task = new Task(this.TextValueTaskName, this.TextValueTaskContent);

            _TasksService.Add(task);
            this.Tasks.Add(task);
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Add(UserTaskDto newUserTask)
        {
            try
            {
                await _tasksService.Add(newUserTask);

                return(Ok());
            }
            catch (DuplicatedTaskTextException e)
            {
                return(BadRequest());
            }
        }