Is it possible to serialize and write database files with NHibernate?
public virtual File Arquivo { get; set; }
It does not let you map and did not want to write without using NHibernate to follow the pattern
Is it possible to serialize and write database files with NHibernate?
public virtual File Arquivo { get; set; }
It does not let you map and did not want to write without using NHibernate to follow the pattern
Yes, it is possible. In C # the type will have to be byte[]
and not File
.
Because File
is a static class, you will never be able to use an instance of File
.
In mapping would stay:
Property(x => x.Arquivo, map =>
{
map.Type(NHibernateUtil.BinaryBlob);
map.Length(Int32.MaxValue);
});