예제 #1
0
 public static A.User ToASP(this D.User entity)
 {
     if (entity is null)
     {
         return(null);
     }
     return(new A.User(entity));
 }
예제 #2
0
 public User(D.User entity)
 {
     Id        = entity.Id;
     Login     = entity.Login;
     Email     = entity.Email;
     FirstName = entity.FirstName;
     LastName  = entity.LastName;
     Password  = entity.Password;
     Salt      = entity.Salt;
     Role      = entity.Role;
 }
예제 #3
0
 public static G.User ToGlobal(this C.User entity)
 {
     if (entity == null)
     {
         return(null);
     }
     return(new G.User {
         id = entity.Id,
         login = entity.Login,
         email = entity.Email,
         first_name = entity.FirstName,
         last_name = entity.LastName,
         password = entity.Password,
         salt = entity.Salt,
         role = entity.Role.ToString()   //(entity.Role == C.UserRole.ADMIN) ? "ADMIN" : (entity.Role == C.UserRole.SIMPLE_USER) ? "SIMPLE_USER" : "NOT_ASSIGNED"
     });
 }