public LinkBO(AttachedLink entity) { LinkId = entity.Id; Name = entity.Name; Link = entity.Link; TaskId = entity.TaskId; NoteId = entity.NoteId; }
public static async Task<AttachedLinkViewModel> Create(AttachedLink model) { var thmbImg = model.ThumbnailUrl == null ? null : await DataCacheDictionary.DownloadImage(new Uri(model.ThumbnailUrl.Replace("$SIZE_SEGMENT", "s100"))).ConfigureAwait(false); return new AttachedLinkViewModel(model.Title, model.Summary, model.LinkUrl, thmbImg); }