コード例 #1
0
 public static UserDto AsDto(this UserDocument document)
 => new UserDto
 {
     Id        = document.Id,
     Email     = document.Email,
     Role      = document.Role,
     CreatedAt = document.CreatedAt
 };
コード例 #2
0
 public static UserDto AsDto(this UserDocument document)
 => new UserDto
 {
     Id          = document.Id,
     Email       = document.Email,
     Role        = document.Role,
     CreatedAt   = document.CreatedAt,
     Permissions = document.Permissions ?? Enumerable.Empty <string>()
 };
コード例 #3
0
 public static User AsEntity(this UserDocument document)
 => new User(document.Id, document.Email, document.Password, document.Role, document.CreatedAt);