public static void Main()
var userService = new UserService();
Console.WriteLine(userService.AddUser("FirstName", "LastName", 20));
public bool AddUser(string firstName, string lastName, int age)
if (string.IsNullOrWhiteSpace(firstName) || string.IsNullOrWhiteSpace(lastName))
Name = firstName + " " + lastName,
IsOfDrinkingAge = canDrink
return UserData.AddUser(user);
public string Name { get; set; }
public int Age { get; set; }
public bool IsOfDrinkingAge { get; set; }
public static class UserData
public static bool AddUser(User person)