public FileResourcePhoto(ProjectImageUpdate projectImageUpdate) { EntityImageIDAsNullable = projectImageUpdate.ProjectImageID; PrimaryKey = projectImageUpdate.ProjectImageUpdateID; FileResourceInfo = projectImageUpdate.FileResourceInfo; DeleteUrl = projectImageUpdate.GetDeleteUrl(); IsKeyPhoto = projectImageUpdate.IsKeyPhoto; Caption = projectImageUpdate.Caption; CaptionOnFullView = projectImageUpdate.GetCaptionOnFullView(); CaptionOnGallery = projectImageUpdate.GetCaptionOnGallery(); PhotoUrl = projectImageUpdate.GetPhotoUrl(); PhotoUrlScaledThumbnail = projectImageUpdate.GetPhotoUrlScaledThumbnail(); EditUrl = projectImageUpdate.GetEditUrl(); AdditionalCssClasses = new List <string>(); }
public static string GetCaptionOnFullView(this ProjectImageUpdate projectImageUpdate) { var creditString = string.IsNullOrWhiteSpace(projectImageUpdate.Credit) ? string.Empty : $"\r\nCredit: {projectImageUpdate.Credit}"; return($"{projectImageUpdate.GetCaptionOnGallery()}{creditString}"); }