Hi There
I have been using SimpleRepository for months now, and for the first time i have to upload and store an Image/Document in the database
My Class looks as follow:
public class Document: ObjectMetaData
{
public string FileName { get; set; }
public Guid UserId { get; set; }
public DocumentType DocumentType { get; set; }
public string DocumentLocation { get; set; }
public byte[] DocumentData { get; set; }
}
public enum DocumentType
{
EmploymentContractSigned = 1,
EmploymentContractUnSigned = 2
}
When i persist the data to the db, subsonic just ignore's the "DocumentData"
how do i save the file to db then?
- DocumantData = File.ReadAllBytes("somefile.doc")