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 }); }
/// <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 }); }