Ejemplo n.º 1
0
 public static UserListItem ToListItem(this A.User entity)
 {
     if (entity is null)
     {
         return(null);
     }
     return(new UserListItem(entity));
 }
 public UserListItem(A.User user)
 {
     Id       = user.Id;
     Login    = user.Login;
     FullName = $"{user.LastName}, {user.FirstName}";
     Email    = user.Email;
     Role     = user.Role.ToString();
 }
Ejemplo n.º 3
0
 public static D.User ToDAL(this A.User entity)
 {
     if (entity is null)
     {
         return(null);
     }
     return(new D.User(entity.Id,
                       entity.Login,
                       entity.Email,
                       entity.FirstName,
                       entity.LastName,
                       entity.Password,
                       entity.Salt,
                       entity.Role));
 }