コード例 #1
0
 public static Api.Movie.Fan.BackEnd.Core.Models.User.Users ToApiUser(this CL.Users.Users entity)
 {
     if (entity == null)
     {
         return(null);
     }
     return(new Api.Movie.Fan.BackEnd.Core.Models.User.Users
     {
         Id = entity.Id,
         Email = entity.Email,
         BirthDate = entity.BirthDate,
         Pseudo = entity.Pseudo
     });
 }
コード例 #2
0
 /// <summary>
 /// Function to convert Client Users to API UserShort
 /// </summary>
 /// <param name="entity">Client Users</param>
 /// <returns>API UserShort</returns>
 public static UserShort ToApi(this CL.Users.Users entity)
 {
     if (entity == null)
     {
         return(null);
     }
     return(new UserShort
     {
         Id = entity.Id,
         Email = entity.Email,
         Pseudo = entity.Pseudo,
         IsAdmin = entity.IsAdmin,
         IsActive = entity.IsActive
     });
 }