// Output C# code to define the task model and DbContext
namespace TodoListAPI.Models
{
public class TaskItem
{
public int Id { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public DateTime DueDate { get; set; }
public bool IsComplete { get; set; }
// Additional properties like Priority, Category, etc.
}
public class TodoListDbContext : DbContext
{
public TodoListDbContext(DbContextOptions<TodoListDbContext> options) : base(options)
{
}
public DbSet<TaskItem> TaskItems { get; set; }
}
// Output C# code to define the task model and DbContext namespace TodoListAPI.Models { public class TaskItem { public int Id { get; set; } public string Title { get; set; } public string Description { get; set; } public DateTime DueDate { get; set; } public bool IsComplete { get; set; } // Additional properties like Priority, Category, etc. }
}