diff --git a/blotztask-api/Models/TaskItemDTO.cs b/blotztask-api/Models/TaskItemDTO.cs index 617af02..264891d 100644 --- a/blotztask-api/Models/TaskItemDTO.cs +++ b/blotztask-api/Models/TaskItemDTO.cs @@ -2,7 +2,7 @@ { public class TaskItemDTO { - public int Id { get; set; } + public int ID { get; set; } public string Title { get; set; } public string Description { get; set; } public bool IsDone { get; set; } diff --git a/blotztask-api/Services/TaskService.cs b/blotztask-api/Services/TaskService.cs index 53c5dc8..cd52884 100644 --- a/blotztask-api/Services/TaskService.cs +++ b/blotztask-api/Services/TaskService.cs @@ -26,7 +26,7 @@ public async Task> GetTodoItems() return await _dbContext.TaskItems .Select(x => new TaskItemDTO { - Id = x.Id, + ID = x.ID, Title = x.Title }) .ToListAsync(); @@ -42,9 +42,9 @@ public async Task GetTaskByID(int ID) var taskItems = new List { - new TaskItemDTO { Id = 0, Title = "Task 0", Description = "Description for Task 1", IsDone = false, CreatedAt = DateTime.Now, UpdatedAt = DateTime.Now }, - new TaskItemDTO { Id = 1, Title = "Task 1", Description = "Description for Task 2", IsDone = true, CreatedAt = DateTime.Now, UpdatedAt = DateTime.Now }, - new TaskItemDTO { Id = 2, Title = "Task 2", Description = "Description for Task 3", IsDone = false, CreatedAt = DateTime.Now, UpdatedAt = DateTime.Now } + new TaskItemDTO { ID = 0, Title = "Task 0", Description = "Description for Task 1", IsDone = false, CreatedAt = DateTime.Now, UpdatedAt = DateTime.Now }, + new TaskItemDTO { ID = 1, Title = "Task 1", Description = "Description for Task 2", IsDone = true, CreatedAt = DateTime.Now, UpdatedAt = DateTime.Now }, + new TaskItemDTO { ID = 2, Title = "Task 2", Description = "Description for Task 3", IsDone = false, CreatedAt = DateTime.Now, UpdatedAt = DateTime.Now } }; return await Task.FromResult(taskItems[ID]);