/// <summary> /// Converts this instance of <see cref="users"/> to an instance of <see cref="usersDTO"/>. /// </summary> /// <param name="entity"><see cref="users"/> to convert.</param> public static usersDTO ToDTO(this users entity) { if (entity == null) { return(null); } var dto = new usersDTO(); dto.id_user = entity.id_user; dto.username = entity.username; dto.fullname = entity.fullname; dto.password = entity.password; dto.create_date = entity.create_date; dto.last_acces_datex = entity.last_acces_datex; dto.status = entity.status; dto.mail = entity.mail; dto.date_of_birth = entity.date_of_birth; dto.profession = entity.profession; dto.id_department = entity.id_department; dto.role = entity.role; entity.OnDTO(dto); return(dto); }