Beispiel #1
0
        public async Task <IActionResult> AddTodoAsync(TodoDTO todoDTO)
        {
            var todoId = await _todoService.AddEntityAsync(todoDTO).ConfigureAwait(false);

            if (todoId != Guid.Empty)
            {
                return(Ok(todoId));
            }
            else
            {
                return(BadRequest("Bir hata oluştu lütfen tekrar deneyiniz."));
            }
        }
Beispiel #2
0
        public async Task <IActionResult> AddEntityAsync(CategoryDTO categoryDTO)
        {
            var categoryId = await _categoryService.AddEntityAsync(categoryDTO).ConfigureAwait(false);

            if (categoryId != Guid.Empty)
            {
                return(Ok(categoryId));
            }
            else
            {
                return(BadRequest("Bir hata oluştu lütfen tekrar deneyiniz."));
            }
        }