Created
June 11, 2019 19:53
-
-
Save danielpetisme/c9fa9087655d352b5a4d594bb228e948 to your computer and use it in GitHub Desktop.
.Net Data Objects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class UserDTO { | |
public string Id { get; set; } | |
public string Login { get; set; } | |
public string FirstName { get; set; } | |
public string LastName { get; set; } | |
public string Email { get; set; } | |
public string ImageUrl { get; set; } | |
public bool Activated { get; set; } | |
public string LangKey { get; set; } | |
public ISet<string> Roles { get; set; } | |
} | |
public class Program | |
{ | |
public static void Main() | |
{ | |
var userDto = new UserDTO { | |
Login = "johwick", | |
FirstName = "John", | |
LastName = "Wick", | |
Email = "[email protected]", | |
Activated = false, | |
ImageUrl = "http://placehold.it/50x50", | |
LangKey = "en", | |
Roles = new HashSet<string> { | |
"ROLE_USER" | |
} | |
}; | |
Console.WriteLine(userDto.FirstName); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment