Exemplo n.º 1
0
 public static LearnerListItemDTO LearnerToken2LearnerListItemDTO(this CRS_LearnerToken entity)
 {
     return(new LearnerListItemDTO
     {
         id = entity.UserId
         , name = entity.Entity2LearnerFullName()
         , fbUid = entity.FacebookID
         , photoUrl = entity.Entity2PhotoUrl(Constants.ImageBaseUrl, Constants.DefaultAvatarUrl)
     });
 }
Exemplo n.º 2
0
 public static SubscriberDTO LearnerToken2SubscriberDto(this CRS_LearnerToken token)
 {
     return(new SubscriberDTO
     {
         id = token.UserId
         , name = token.Entity2LearnerFullName()
         , fbUid = token.FacebookID
         , photoUrl = token.Entity2PhotoUrl(Constants.ImageBaseUrl, Constants.DefaultAvatarUrl)
         , email = token.Email
         , url = token.Entity2PhotoUrl(Constants.ImageBaseUrl, Constants.DefaultAvatarUrl)
     });
 }
Exemplo n.º 3
0
 public static string Entity2PhotoUrl(this CRS_LearnerToken entity, string imageBaseUrl, string defaultAvatarUrl)
 {
     return(GetPhotoUrl(entity.PictureURL, entity.FacebookID, imageBaseUrl, defaultAvatarUrl));
 }
Exemplo n.º 4
0
 public static string Entity2LearnerFullName(this CRS_LearnerToken entity)
 {
     return(CombineFullName(entity.FirstName, entity.LastName, entity.Nickname));
 }