public static webModel.Image ToWebModel(this moduleModel.Image image, IBlobUrlResolver blobUrlResolver) { var retVal = new webModel.Image(); retVal.InjectFrom(image); retVal.Src = blobUrlResolver.GetAbsoluteUrl(image.Url); retVal.ThumbSrc = retVal.Src; if(retVal.Name == null) { retVal.Name = retVal.Group; } return retVal; }
public static webModel.Image ToWebModel(this moduleModel.Image image, IBlobUrlResolver blobUrlResolver) { var retVal = new webModel.Image(); retVal.InjectFrom(image); retVal.Src = blobUrlResolver.GetAbsoluteUrl(image.Url); retVal.ThumbSrc = retVal.Src; if (retVal.Name == null) { retVal.Name = retVal.Group; } return(retVal); }