I have an entity like
[Serializable]
public class Person : AbstractEntity<Person>
{
public virtual Byte[] Image { get; set; }
}
I’m using NHibernate 3.x. Howcome do I avoid saving the blob Image to a database (SQL Server Express 2010)? Any better alternative?
Thanks!
when you save the image, save it to a non-obvious folder, and change the name of the image file to a unique filename(I assume you have a ID field which you can use), save the filename to database.
lets say you want to bind a view with person model, you could do something like
this is I used to use for my site, and I have a home project which I follow same method. it is just an alternative to store pics as blob.
hope it helps