public Attachment(AttachmentJsonModel model) { Id = model.Id; Filename = model.Filename; Filesize = model.Size; Url = model.Url; ProxyUrl = model.ProxyUrl; Size = model.Width.HasValue && model.Height.HasValue ? new Size(model.Width.Value.GetValueOrDefault(), model.Height.Value.GetValueOrDefault()) : null; }
public Attachment(AttachmentJsonModel model) { Id = model.Id; FileName = model.FileName; ContentType = model.ContentType.GetValueOrDefault(); FileSize = model.Size; Url = model.Url; ProxyUrl = model.ProxyUrl; Width = model.Width.GetValueOrNullable(); Height = model.Height.GetValueOrNullable(); }