0
我讀了很多abuot存儲與attatchments圖像。但我想知道在ravenDb中存儲image-INFO的正確方法是什麼。所以我可以使用這些信息並從一些在線存儲中獲取圖像。 我想我需要的路徑..也許,有,身高等......那麼在烏鴉dbDocument中做這件事的正確方法是什麼?正確的方式來存儲圖像信息在RavenDb不使用attatchments
我讀了很多abuot存儲與attatchments圖像。但我想知道在ravenDb中存儲image-INFO的正確方法是什麼。所以我可以使用這些信息並從一些在線存儲中獲取圖像。 我想我需要的路徑..也許,有,身高等......那麼在烏鴉dbDocument中做這件事的正確方法是什麼?正確的方式來存儲圖像信息在RavenDb不使用attatchments
不知道更多關於你的要求,我的基本回答是這樣的:
public class Image
{
/// <summary>
/// Gets or sets the original name of the Image.
/// </summary>
public string FileName { get; set; }
/// <summary>
/// Gets or sets the physical location of the Image
/// </summary>
public string Location {get; set;}
/// <summary>
/// Gets or sets the size of the file.
/// </summary>
public long FileSize { get; set; }
/// <summary>
/// Gets or sets the MIME type of the file.
/// </summary>
public string MimeType { get; set; }
/// <summary>
/// Gets or sets the Width, in pixels, of the Image
/// </summary>
public int Width { get; set; }
/// <summary>
/// Gets or sets the Height, in pixels, of the Image
/// </summary>
public int Height { get; set; }
/// <summary>
/// Gets or sets the thumbnails.
/// </summary>
/// <value>
/// The thumbnails.
/// </value>
public ICollection<Thumbnail> Thumbnails { get; protected set; }
/// <summary>
/// Gets or sets the last Thumbnail id.
/// </summary>
public int LastThumbnailId { get; set; }
/// <summary>
/// Generates the new Thumbnail id.
/// </summary>
/// <returns></returns>
public int GenerateNewThumbnailId()
{
return ++LastThumbnailId;
}
}
public class Thumbnail
{
/// <summary>
/// Gets or sets the Thumbnail id.
/// </summary>
public int Id { get; set; }
/// <summary>
/// Gets or sets the Width, in pixels, of the Thumbnail
/// </summary>
public int Width { get; set; }
/// <summary>
/// Gets or sets the Height, in pixels, of the Thumbnail
/// </summary>
public int Height { get; set; }
/// <summary>
/// Gets or sets the physical location of the Thumbnail
/// </summary>
public string Location {get; set;}
}