Example #1
0
 internal static ResourceRating Map(this ResourceArticleUserRatingEntity entity)
 {
     return(new ResourceRating
     {
         Id = entity.id,
         ResourceId = entity.resourceArticleId,
         UserId = entity.userId,
         Rating = entity.rating,
         LastUpdatedTime = entity.lastUpdatedTime,
         ResourceType = (ResourceType)entity.resourceType,
     });
 }
Example #2
0
        internal static ResourceArticleUserRatingEntity Map(this ResourceRating rating)
        {
            var entity = new ResourceArticleUserRatingEntity
            {
                id = rating.Id,
                resourceArticleId = rating.ResourceId,
                userId            = rating.UserId,
                resourceType      = (byte)rating.ResourceType,
            };

            rating.MapTo(entity);
            return(entity);
        }
Example #3
0
 internal static void MapTo(this ResourceRating rating, ResourceArticleUserRatingEntity entity)
 {
     entity.rating          = rating.Rating;
     entity.lastUpdatedTime = rating.LastUpdatedTime;
 }