namespace RadzenTest.Models
{
    public class User
    {
        public int Id { get; set; }

        public string Name { get; set; }

        public DateTime BirthDate { get; set; }

        public static async Task<List<User>> GetUsers()
        {
            // Simulate an asynchronous operation, e.g., fetching data from a database
            await Task.Delay(1000);
            return new List<User>
            {
                new User { Id = 1, Name = "Alice", BirthDate = new DateTime(1990, 1, 1) },
                new User { Id = 2, Name = "Bob", BirthDate = new DateTime(1985, 5, 15) },
                new User { Id = 3, Name = "Charlie", BirthDate = new DateTime(2000, 12, 25) }
            }.OrderByDescending(u => u.BirthDate).ToList();
        }
    }
}
